From 31ff94add9c4043a753683d9e8b68733c69aa1ac Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 29 May 2023 16:45:49 +0100 Subject: Tests: more fixtures. Common methods from applications/proto.py converted to the fixtures. sysctl check moved to the specific file where it is using. Some options moved to the constructor to have early access. --- test/test_asgi_websockets.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/test_asgi_websockets.py') diff --git a/test/test_asgi_websockets.py b/test/test_asgi_websockets.py index e5b88206..3fab318c 100644 --- a/test/test_asgi_websockets.py +++ b/test/test_asgi_websockets.py @@ -5,7 +5,6 @@ import pytest from packaging import version from unit.applications.lang.python import TestApplicationPython from unit.applications.websockets import TestApplicationWebsocket -from unit.option import option class TestASGIWebsockets(TestApplicationPython): @@ -1314,7 +1313,7 @@ class TestASGIWebsockets(TestApplicationPython): self.ws.frame_write(sock, self.ws.OP_CLOSE, payload) self.check_close(sock, 1002) - def test_asgi_websockets_9_1_1__9_6_6(self, is_unsafe): + def test_asgi_websockets_9_1_1__9_6_6(self, is_unsafe, system): if not is_unsafe: pytest.skip('unsafe, long run') @@ -1371,7 +1370,7 @@ class TestASGIWebsockets(TestApplicationPython): check_payload(op_binary, 8 * 2**20) # 9_2_5 check_payload(op_binary, 16 * 2**20) # 9_2_6 - if option.system != 'Darwin' and option.system != 'FreeBSD': + if system not in ['Darwin', 'FreeBSD']: check_message(op_text, 64) # 9_3_1 check_message(op_text, 256) # 9_3_2 check_message(op_text, 2**10) # 9_3_3 -- cgit