summaryrefslogtreecommitdiff
path: root/Lib/test/test_wsgiref.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-04-13 16:44:05 -0500
committerZachary Ware <zachary.ware@gmail.com>2015-04-13 16:44:05 -0500
commit8cc6d42d475c53396afaf972f03bee07ee4739bd (patch)
treeff70de39fc13210d28c609aa90ff93d35a9db359 /Lib/test/test_wsgiref.py
parent187d9878e860b66d78bfd4c8d538130c72cc724a (diff)
parent81833b5e59153c758f894c851ad1ec4e7942c4b5 (diff)
downloadcpython-8cc6d42d475c53396afaf972f03bee07ee4739bd.tar.gz
Closes #23730: merge with 3.4
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rw-r--r--Lib/test/test_wsgiref.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py
index 5704fc7826..112a1b9d4b 100644
--- a/Lib/test/test_wsgiref.py
+++ b/Lib/test/test_wsgiref.py
@@ -368,6 +368,7 @@ class HeaderTests(TestCase):
def testMappingInterface(self):
test = [('x','y')]
+ self.assertEqual(len(Headers()), 0)
self.assertEqual(len(Headers([])),0)
self.assertEqual(len(Headers(test[:])),1)
self.assertEqual(Headers(test[:]).keys(), ['x'])
@@ -375,7 +376,7 @@ class HeaderTests(TestCase):
self.assertEqual(Headers(test[:]).items(), test)
self.assertIsNot(Headers(test).items(), test) # must be copy!
- h=Headers([])
+ h = Headers()
del h['foo'] # should not raise an error
h['Foo'] = 'bar'
@@ -400,9 +401,8 @@ class HeaderTests(TestCase):
def testRequireList(self):
self.assertRaises(TypeError, Headers, "foo")
-
def testExtras(self):
- h = Headers([])
+ h = Headers()
self.assertEqual(str(h),'\r\n')
h.add_header('foo','bar',baz="spam")
@@ -658,8 +658,5 @@ class HandlerTests(TestCase):
self.assertEqual(side_effects['close_called'], True)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()