Add the missing tests

This commit is contained in:
mhchia
2019-09-09 16:58:58 +08:00
parent be2c0f122a
commit 0ab548aee5
3 changed files with 125 additions and 0 deletions

14
tests/network/conftest.py Normal file
View File

@ -0,0 +1,14 @@
import asyncio
import pytest
from tests.factories import net_stream_pair_factory
@pytest.fixture
async def net_stream_pair():
stream_0, host_0, stream_1, host_1 = await net_stream_pair_factory()
try:
yield stream_0, stream_1
finally:
await asyncio.gather(*[host_0.close(), host_1.close()])