From c832f8ffbbcbec7b592c3203ff3da495505a36ba Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 22 Nov 2019 01:20:15 -0500 Subject: [PATCH] fix mock_network_loop param --- lbry/tests/dht_mocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/tests/dht_mocks.py b/lbry/tests/dht_mocks.py index c725ec32e..2e01986c0 100644 --- a/lbry/tests/dht_mocks.py +++ b/lbry/tests/dht_mocks.py @@ -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]):