Tests: added test with "Transfer-Encoding" header in 204 response.
This commit is contained in:
@@ -102,6 +102,23 @@ def application(environ, start_response):
|
|||||||
self.assertEqual(r.headers.pop('Server-Port'), '7080',
|
self.assertEqual(r.headers.pop('Server-Port'), '7080',
|
||||||
'Server-Port header')
|
'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__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user