Add test for checking p2p code

This commit is contained in:
mhchia 2019-07-08 17:55:25 +08:00
parent d3eb68fa50
commit a2d1aadf25
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A

View File

@ -35,9 +35,12 @@ def test_init_no_value():
@pytest.mark.parametrize(
'addr',
(
None,
random.randint(0, 255),
multiaddr.Multiaddr('/'),
pytest.param(None),
pytest.param(random.randint(0, 255), id='random integer'),
pytest.param(multiaddr.Multiaddr('/'), id='empty multiaddr'),
pytest.param(
multiaddr.Multiaddr('/ip4/127.0.0.1'), id='multiaddr without peer_id(p2p protocol)'
),
)
)
def test_info_from_p2p_addr_invalid(addr):