summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-01-24 15:43:36 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-01-24 15:43:36 +0300
commit955ba9d7dde780aec69744af84ae39aab129468c (patch)
tree517218c8a8e099602912b3fe4b4f321bfa3bde95
parent331514fcf75dde719267efc970979524312d268e (diff)
downloadunit-955ba9d7dde780aec69744af84ae39aab129468c.tar.gz
unit-955ba9d7dde780aec69744af84ae39aab129468c.tar.bz2
Tests: added test with "Transfer-Encoding" header in 204 response.
-rw-r--r--test/test_python_application.py17
1 files changed, 17 insertions, 0 deletions
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()