fix unit tests
This commit is contained in:
parent
18d80f4ed5
commit
517868f73c
2 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
@lru_cache(1024)
|
||||
def get_kademlia_peer(node_id: typing.Optional[bytes], address: typing.Optional[str],
|
||||
udp_port: typing.Optional[int],
|
||||
udp_port: typing.Optional[int] = None,
|
||||
tcp_port: typing.Optional[int] = None) -> 'KademliaPeer':
|
||||
return KademliaPeer(address, node_id, udp_port, tcp_port=tcp_port)
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class BlobExchangeTestBase(AsyncioTestCase):
|
|||
self.client_storage = SQLiteStorage(self.client_config, os.path.join(self.client_dir, "lbrynet.sqlite"))
|
||||
self.client_blob_manager = BlobManager(self.loop, self.client_dir, self.client_storage, self.client_config)
|
||||
self.client_peer_manager = PeerManager(self.loop)
|
||||
self.server_from_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", udp_port=33333)
|
||||
self.server_from_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", tcp_port=33333)
|
||||
|
||||
await self.client_storage.open()
|
||||
await self.server_storage.open()
|
||||
|
@ -103,7 +103,7 @@ class TestBlobExchange(BlobExchangeTestBase):
|
|||
second_client_blob_manager = BlobManager(
|
||||
self.loop, second_client_dir, second_client_storage, second_client_conf
|
||||
)
|
||||
server_from_second_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", udp_port=33333)
|
||||
server_from_second_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", tcp_port=33333)
|
||||
|
||||
await second_client_storage.open()
|
||||
await second_client_blob_manager.setup()
|
||||
|
@ -194,7 +194,7 @@ class TestBlobExchange(BlobExchangeTestBase):
|
|||
second_client_blob_manager = BlobManager(
|
||||
self.loop, second_client_dir, second_client_storage, second_client_conf
|
||||
)
|
||||
server_from_second_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", udp_port=33333)
|
||||
server_from_second_client = get_kademlia_peer(b'1' * 48, "127.0.0.1", tcp_port=33333)
|
||||
|
||||
await second_client_storage.open()
|
||||
await second_client_blob_manager.setup()
|
||||
|
|
Loading…
Add table
Reference in a new issue