| import pytest | |
| from libp2p.tools.factories import ( | |
| HostFactory, | |
| ) | |
| def security_protocol(): | |
| return None | |
| def num_hosts(): | |
| return 3 | |
| 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 | |