diff --git a/tests.py b/test_echo_server.py similarity index 95% rename from tests.py rename to test_echo_server.py index 04014c7..d0437cb 100644 --- a/tests.py +++ b/test_echo_server.py @@ -92,10 +92,6 @@ def test_stop(): 'You ever wonder why we are here?', 'Lorem ipsum dolor sit amet', 'You always have a plan, Dutch!', - token_urlsafe(32), - token_urlsafe(32), - token_urlsafe(32), - token_urlsafe(32) ] ) def test_io(io_pipes, test_data): @@ -103,6 +99,12 @@ def test_io(io_pipes, test_data): assert io_pipes.recv().decode() == test_data +def test_io_random(io_pipes): + test_data = token_urlsafe(512) + for _ in range(100): + io_pipes.send_message(test_data.encode()) + assert io_pipes.recv().decode() == test_data + @pytest.mark.parametrize( 'test_data_size', [ 1024,