test_asgi_websockets.py (1635:97afbb6c5a15) test_asgi_websockets.py (1654:fc7d0578e124)
1import struct
2import time
3from distutils.version import LooseVersion
4
5import pytest
6
7from conftest import option
8from conftest import skip_alert

--- 4 unchanged lines hidden (view full) ---

13class TestASGIWebsockets(TestApplicationPython):
14 prerequisites = {'modules': {'python':
15 lambda v: LooseVersion(v) >= LooseVersion('3.5')}}
16 load_module = 'asgi'
17
18 ws = TestApplicationWebsocket()
19
20 def setup_method(self):
1import struct
2import time
3from distutils.version import LooseVersion
4
5import pytest
6
7from conftest import option
8from conftest import skip_alert

--- 4 unchanged lines hidden (view full) ---

13class TestASGIWebsockets(TestApplicationPython):
14 prerequisites = {'modules': {'python':
15 lambda v: LooseVersion(v) >= LooseVersion('3.5')}}
16 load_module = 'asgi'
17
18 ws = TestApplicationWebsocket()
19
20 def setup_method(self):
21 super().setup_method()
22
23 assert 'success' in self.conf(
24 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
25 ), 'clear keepalive_interval'
26
27 skip_alert(r'socket close\(\d+\) failed')
28
29 def close_connection(self, sock):
30 assert self.recvall(sock, read_timeout=0.1) == b'', 'empty soc'

--- 1416 unchanged lines hidden ---
21 assert 'success' in self.conf(
22 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
23 ), 'clear keepalive_interval'
24
25 skip_alert(r'socket close\(\d+\) failed')
26
27 def close_connection(self, sock):
28 assert self.recvall(sock, read_timeout=0.1) == b'', 'empty soc'

--- 1416 unchanged lines hidden ---