test_asgi_application.py (1695:48cd8f20dea4) test_asgi_application.py (1697:73a335d2911d)
1import re
2import time
3from distutils.version import LooseVersion
4
5import pytest
6
7from conftest import option
8from conftest import skip_alert

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

413
414 assert resp['status'] == 200, 'status'
415
416 threads.add(resp['headers']['x-thread'])
417
418 sock.close()
419
420 assert len(socks) == len(threads), 'threads differs'
1import re
2import time
3from distutils.version import LooseVersion
4
5import pytest
6
7from conftest import option
8from conftest import skip_alert

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

413
414 assert resp['status'] == 200, 'status'
415
416 threads.add(resp['headers']['x-thread'])
417
418 sock.close()
419
420 assert len(socks) == len(threads), 'threads differs'
421
422 def test_asgi_application_legacy(self):
423 self.load('legacy')
424
425 resp = self.get(
426 headers={
427 'Host': 'localhost',
428 'Content-Length': '0',
429 'Connection': 'close',
430 },
431 )
432
433 assert resp['status'] == 200, 'status'
434
435 def test_asgi_application_legacy_force(self):
436 self.load('legacy_force', protocol='asgi')
437
438 resp = self.get(
439 headers={
440 'Host': 'localhost',
441 'Content-Length': '0',
442 'Connection': 'close',
443 },
444 )
445
446 assert resp['status'] == 200, 'status'