From 3deccac2da11cd5024b01a9a4e65f9fd35efabce Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 28 Oct 2019 20:38:43 +0900 Subject: [PATCH] fix tests --- tests/host/test_basic_host.py | 4 ++-- tests/network/test_notify.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/host/test_basic_host.py b/tests/host/test_basic_host.py index 5718b6d..4d22222 100644 --- a/tests/host/test_basic_host.py +++ b/tests/host/test_basic_host.py @@ -7,8 +7,8 @@ from libp2p.host.defaults import get_default_protocols def test_default_protocols(): key_pair = create_new_key_pair() swarm = initialize_default_swarm(key_pair) - host = BasicHost(swarm) + host = BasicHost(key_pair.public_key, swarm) mux = host.get_mux() handlers = mux.handlers - assert handlers == get_default_protocols() + assert handlers == get_default_protocols(host) diff --git a/tests/network/test_notify.py b/tests/network/test_notify.py index 78e407e..6c72bb2 100644 --- a/tests/network/test_notify.py +++ b/tests/network/test_notify.py @@ -14,6 +14,7 @@ import enum import pytest +from libp2p.crypto.rsa import create_new_key_pair from libp2p.network.notifee_interface import INotifee from tests.configs import LISTEN_MADDR from tests.factories import SwarmFactory @@ -56,7 +57,7 @@ class MyNotifee(INotifee): @pytest.mark.asyncio async def test_notify(is_host_secure): - swarms = [SwarmFactory(is_host_secure) for _ in range(2)] + swarms = [SwarmFactory(is_host_secure, create_new_key_pair()) for _ in range(2)] events_0_0 = [] events_1_0 = []