Python: supporting ASGI legacy protocol.
Introducing manual protocol selection for 'universal' apps and frameworks.
This commit is contained in:
@@ -418,3 +418,29 @@ Connection: close
|
||||
sock.close()
|
||||
|
||||
assert len(socks) == len(threads), 'threads differs'
|
||||
|
||||
def test_asgi_application_legacy(self):
|
||||
self.load('legacy')
|
||||
|
||||
resp = self.get(
|
||||
headers={
|
||||
'Host': 'localhost',
|
||||
'Content-Length': '0',
|
||||
'Connection': 'close',
|
||||
},
|
||||
)
|
||||
|
||||
assert resp['status'] == 200, 'status'
|
||||
|
||||
def test_asgi_application_legacy_force(self):
|
||||
self.load('legacy_force', protocol='asgi')
|
||||
|
||||
resp = self.get(
|
||||
headers={
|
||||
'Host': 'localhost',
|
||||
'Content-Length': '0',
|
||||
'Connection': 'close',
|
||||
},
|
||||
)
|
||||
|
||||
assert resp['status'] == 200, 'status'
|
||||
|
||||
Reference in New Issue
Block a user