diff options
Diffstat (limited to 'test/test_asgi_application.py')
-rw-r--r-- | test/test_asgi_application.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test_asgi_application.py b/test/test_asgi_application.py index 2e73e529..e90d78bc 100644 --- a/test/test_asgi_application.py +++ b/test/test_asgi_application.py @@ -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' |