mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-02 05:04:23 +01:00
Fixes from PR review
This commit is contained in:
@@ -183,8 +183,3 @@ def test_get_all_appointments_responder():
|
||||
|
||||
assert (set(responder_jobs) == set(local_locators))
|
||||
assert (len(received_appointments["watcher_appointments"]) == 0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,5 +87,3 @@ def test_encrypt():
|
||||
encrypted_blob2 = blob.encrypt(key)
|
||||
|
||||
assert(encrypted_blob == encrypted_blob2 and id(encrypted_blob) != id(encrypted_blob2))
|
||||
|
||||
|
||||
|
||||
@@ -73,4 +73,3 @@ def test_potential_matches_random_data(locator_uuid_map):
|
||||
|
||||
# None of the txids should match
|
||||
assert len(potential_matches) == 0
|
||||
|
||||
|
||||
@@ -78,4 +78,3 @@ def test_delete_completed_jobs():
|
||||
Cleaner.delete_completed_jobs(jobs, tx_job_map, completed_jobs, 0)
|
||||
|
||||
assert not set(completed_jobs).issubset(jobs.keys())
|
||||
|
||||
|
||||
@@ -34,6 +34,3 @@ def test_decrypt():
|
||||
encrypted_blob = EncryptedBlob(encrypted_data)
|
||||
|
||||
assert(encrypted_blob.decrypt(key) == data)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -230,4 +230,3 @@ def test_inspect():
|
||||
and appointment.end_time == end_time and appointment.dispute_delta == dispute_delta and
|
||||
appointment.encrypted_blob.data == encrypted_blob and appointment.cipher == cipher and
|
||||
appointment.hash_function == hash_function)
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@ def test_check_txid_format():
|
||||
assert(check_txid_format(None) is False)
|
||||
assert(check_txid_format("") is False)
|
||||
assert(check_txid_format(0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef) is False) # wrong type
|
||||
assert(check_txid_format("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef") is True) # lowercase
|
||||
assert(check_txid_format("0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF") is True) # uppercase
|
||||
assert(check_txid_format("abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd") is True) # lowercase
|
||||
assert(check_txid_format("ABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCD") is True) # uppercase
|
||||
assert(check_txid_format("0123456789abcdef0123456789ABCDEF0123456789abcdef0123456789ABCDEF") is True) # mixed case
|
||||
assert(check_txid_format("0123456789012345678901234567890123456789012345678901234567890123") is True) # only nums
|
||||
assert(check_txid_format("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdf") is False) # too short
|
||||
assert(check_txid_format("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0") is False) # too long
|
||||
assert(check_txid_format("g123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef") is False) # non-hex
|
||||
|
||||
Reference in New Issue
Block a user