Change argument name of Network.listen and blakc format

This commit is contained in:
NIC619
2019-08-01 13:25:20 +08:00
parent cd684aad9e
commit 924e965537
7 changed files with 23 additions and 35 deletions

View File

@ -3,10 +3,7 @@ import multihash
import pytest
import base58
from Crypto.PublicKey import RSA
from libp2p.peer.id import (
ID,
id_b58_encode,
)
from libp2p.peer.id import ID, id_b58_encode
ALPHABETS = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
@ -17,11 +14,10 @@ def test_init():
for _ in range(10):
random_id_string += random.SystemRandom().choice(ALPHABETS)
peer_id = ID(random_id_string.encode())
#pylint: disable=protected-access
# pylint: disable=protected-access
assert peer_id == random_id_string.encode()
def test_no_init_value():
with pytest.raises(Exception) as _:
# pylint: disable=no-value-for-parameter