fix mock_network_loop param

This commit is contained in:
Jack Robison 2019-11-22 01:20:15 -05:00
parent d7fe46dbde
commit c832f8ffbb
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -50,7 +50,7 @@ def get_time_accelerator(loop: asyncio.AbstractEventLoop,
@contextlib.contextmanager
def mock_network_loop(loop: asyncio.AbstractEventLoop,
dht_network: typing.Optional[typing.Dict[typing.Tuple[str, int], 'KademliaProtocol']] = None):
dht_network: typing.Dict[typing.Tuple[str, int], 'KademliaProtocol'] = dht_network or {}
dht_network: typing.Dict[typing.Tuple[str, int], 'KademliaProtocol'] = dht_network if dht_network is not None else {}
async def create_datagram_endpoint(proto_lam: typing.Callable[[], 'KademliaProtocol'],
from_addr: typing.Tuple[str, int]):