test: Fix test_packet_stream.py so there are no coverage issues in it
This commit is contained in:
parent
9e4a254127
commit
a85fce7e3f
@ -37,7 +37,7 @@ from ssb.packet_stream import PacketStream, PSMessage, PSMessageType
|
||||
async def _collect_messages(generator: AsyncIterator[Optional[PSMessage]]) -> List[Optional["PSMessage"]]:
|
||||
results = []
|
||||
|
||||
async for msg in generator:
|
||||
async for msg in generator: # pragma: no branch
|
||||
results.append(msg)
|
||||
|
||||
return results
|
||||
@ -106,11 +106,6 @@ class MockSHSSocket(SHSDuplexStream):
|
||||
|
||||
yield self.output.pop(0)
|
||||
|
||||
def disconnect(self) -> None:
|
||||
"""Disconnect from the remote party"""
|
||||
|
||||
self.is_connected = False
|
||||
|
||||
|
||||
class MockSHSClient(MockSHSSocket):
|
||||
"""A mocked SHS client"""
|
||||
@ -120,9 +115,6 @@ class MockSHSClient(MockSHSSocket):
|
||||
|
||||
self.is_connected = True
|
||||
|
||||
for cb in self._on_connect:
|
||||
await cb()
|
||||
|
||||
|
||||
class MockSHSServer(MockSHSSocket):
|
||||
"""A mocked SHS server"""
|
||||
|
Loading…
Reference in New Issue
Block a user