File size: 397 Bytes
f0f4f2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import pytest

from libp2p.tools.factories import (
    HostFactory,
)


@pytest.fixture
def security_protocol():
    return None


@pytest.fixture
def num_hosts():
    return 3


@pytest.fixture
async def hosts(num_hosts, security_protocol, nursery):
    async with HostFactory.create_batch_and_listen(
        num_hosts, security_protocol=security_protocol
    ) as _hosts:
        yield _hosts