summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_wsgiref.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py
index b8cf635..a08f66b 100644
--- a/Lib/test/test_wsgiref.py
+++ b/Lib/test/test_wsgiref.py
@@ -520,6 +520,11 @@ class HandlerTests(TestCase):
s('200 OK',[])
return ['\u0442\u0435\u0441\u0442'.encode("utf-8")]
+ def trivial_app4(e,s):
+ # Simulate a response to a HEAD request
+ s('200 OK',[('Content-Length', '12345')])
+ return []
+
h = TestHandler()
h.run(trivial_app1)
self.assertEqual(h.stdout.getvalue(),
@@ -543,10 +548,12 @@ class HandlerTests(TestCase):
b'\r\n'
b'\xd1\x82\xd0\xb5\xd1\x81\xd1\x82')
-
-
-
-
+ h = TestHandler()
+ h.run(trivial_app4)
+ self.assertEqual(h.stdout.getvalue(),
+ b'Status: 200 OK\r\n'
+ b'Content-Length: 12345\r\n'
+ b'\r\n')
def testBasicErrorOutput(self):