Update peerid tests for longer peerids
This commit is contained in:
parent
702af198f2
commit
1250182e7c
|
@ -46,9 +46,7 @@ def test_str_more_than_10():
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
random_id_string += random.SystemRandom().choice(ALPHABETS)
|
random_id_string += random.SystemRandom().choice(ALPHABETS)
|
||||||
pid = base58.b58encode(random_id_string).decode()
|
pid = base58.b58encode(random_id_string).decode()
|
||||||
part_1, part_2 = pid[:2], pid[len(pid)-6:]
|
expected = "<peer.ID " + pid + ">"
|
||||||
|
|
||||||
expected = "<peer.ID " + part_1 + "*" + part_2 + ">"
|
|
||||||
actual = ID(random_id_string).__str__()
|
actual = ID(random_id_string).__str__()
|
||||||
|
|
||||||
assert actual == expected
|
assert actual == expected
|
||||||
|
|
Loading…
Reference in New Issue
Block a user