From 955ba9d7dde780aec69744af84ae39aab129468c Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Wed, 24 Jan 2018 15:43:36 +0300 Subject: Tests: added test with "Transfer-Encoding" header in 204 response. --- test/test_python_application.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/test_python_application.py b/test/test_python_application.py index d3180d62..c9be46af 100644 --- a/test/test_python_application.py +++ b/test/test_python_application.py @@ -102,6 +102,23 @@ def application(environ, start_response): self.assertEqual(r.headers.pop('Server-Port'), '7080', 'Server-Port header') + @unittest.expectedFailure + def test_python_application_204_transfer_encoding(self): + code, name = """ + +def application(environ, start_response): + + start_response('204 No Content', []) + return [] + +""", 'py_app' + + self.python_application(name, code) + self.put('/', self.conf % (self.testdir + '/' + name)) + + r = unit.TestUnitHTTP.get(headers={'Host': 'localhost'}) + self.assertNotIn('Transfer-Encoding', r.headers, + '204 header transfer encoding') if __name__ == '__main__': unittest.main() -- cgit