mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 15:40:54 +00:00
test_noise_connection: fix missing nursery
This commit is contained in:
@ -3,6 +3,9 @@ import pytest
|
|||||||
from libp2p.tools.factories import noise_conn_factory
|
from libp2p.tools.factories import noise_conn_factory
|
||||||
|
|
||||||
|
|
||||||
|
DATA = b"testing_123"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.trio
|
@pytest.mark.trio
|
||||||
async def test_noise_transport(nursery):
|
async def test_noise_transport(nursery):
|
||||||
async with noise_conn_factory(nursery):
|
async with noise_conn_factory(nursery):
|
||||||
@ -10,6 +13,9 @@ async def test_noise_transport(nursery):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.trio
|
@pytest.mark.trio
|
||||||
async def test_noise_connection():
|
async def test_noise_connection(nursery):
|
||||||
async with noise_conn_factory() as conns:
|
async with noise_conn_factory(nursery) as conns:
|
||||||
local_conn, remote_conn = conns
|
local_conn, remote_conn = conns
|
||||||
|
await local_conn.write(DATA)
|
||||||
|
read_data = await remote_conn.read(len(DATA))
|
||||||
|
assert read_data == DATA
|
||||||
|
|||||||
Reference in New Issue
Block a user