diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-07-02 05:37:22 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-07-02 05:37:22 (GMT) |
commit | 3e887222aa758ac5a3fb61c8e77e909372462d00 (patch) | |
tree | f9f849ce560197cb1de6bffb09be692c3cae0e1f /Lib/test/test_wsgiref.py | |
parent | 09db75fcd64ea5056622ae744d31f494e719cd19 (diff) | |
download | cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.zip cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.tar.gz cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.tar.bz2 |
Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
Patch by Pablo Torres Navarrete and SilentGhost.
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rw-r--r-- | Lib/test/test_wsgiref.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index 901f3c9..190f3ba 100644 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -338,6 +338,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']) @@ -345,7 +346,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' @@ -370,9 +371,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") |