fix tests
This commit is contained in:
parent
0ca3e83540
commit
3deccac2da
|
@ -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)
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user