2019-08-29 21:38:06 +08:00
|
|
|
import pytest
|
|
|
|
|
2019-11-21 11:47:54 +08:00
|
|
|
from libp2p.tools.factories import HostFactory
|
2019-08-29 21:38:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def is_host_secure():
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def num_hosts():
|
|
|
|
return 3
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2019-11-29 19:09:56 +08:00
|
|
|
async def hosts(num_hosts, is_host_secure, nursery):
|
|
|
|
async with HostFactory.create_batch_and_listen(is_host_secure, num_hosts) as _hosts:
|
2019-08-29 21:38:06 +08:00
|
|
|
yield _hosts
|