From 7ccdeaf308c1ccf2887506575e8cf2eb35b965a4 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sat, 24 Aug 2019 22:10:47 +0200 Subject: [PATCH] Remove test suite for `asyncio`, *not* `py-libp2p` --- tests/network/__init__.py | 0 tests/network/test_connection.py | 27 --------------------------- 2 files changed, 27 deletions(-) delete mode 100644 tests/network/__init__.py delete mode 100644 tests/network/test_connection.py diff --git a/tests/network/__init__.py b/tests/network/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/network/test_connection.py b/tests/network/test_connection.py deleted file mode 100644 index 0beadec..0000000 --- a/tests/network/test_connection.py +++ /dev/null @@ -1,27 +0,0 @@ -import asyncio - -import pytest - - -async def handle_echo(reader, writer): - data = await reader.read(100) - writer.write(data) - await writer.drain() - writer.close() - - -@pytest.mark.asyncio -# TODO: this test should develop out into a fuller test between MPlex -# modules communicating with each other. -async def test_simple_echo(): - server_ip = "127.0.0.1" - server_port = 8888 - await asyncio.start_server(handle_echo, server_ip, server_port) - - reader, writer = await asyncio.open_connection(server_ip, server_port) - - test_message = "hello world" - writer.write(test_message.encode()) - response = (await reader.read()).decode() - - assert response == (test_message)