This commit is contained in:
Chih Cheng Liang
2019-08-08 14:22:06 +08:00
committed by Kevin Mai-Husan Chia
parent 5903012e0e
commit c536aa3e07
19 changed files with 58 additions and 62 deletions

View File

@ -89,7 +89,7 @@ async def no_common_protocol(host_a, host_b):
# try to creates a new new with a procotol not known by the other host
with pytest.raises(MultiselectClientError):
_ = await host_b.new_stream(host_a.get_id(), ["/fakeproto/0.0.1"])
await host_b.new_stream(host_a.get_id(), ["/fakeproto/0.0.1"])
@pytest.mark.asyncio

View File

@ -19,7 +19,7 @@ def test_init():
def test_no_init_value():
with pytest.raises(Exception) as _:
with pytest.raises(Exception):
ID()

View File

@ -28,7 +28,7 @@ def test_init_():
def test_init_no_value():
with pytest.raises(Exception) as _:
with pytest.raises(Exception):
PeerInfo()

View File

@ -4,6 +4,8 @@ from libp2p.pubsub.mcache import MessageCache
class Msg:
__slots__ = ["topicIDs", "seqno", "from_id"]
def __init__(self, topicIDs, seqno, from_id):
self.topicIDs = topicIDs
self.seqno = seqno