diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-01-03 20:28:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-01-03 20:28:05 (GMT) |
commit | a9ecbdade7271c30e691d8fab82085be68864624 (patch) | |
tree | 16d3cebebb4a37f3426f390e623dd6fe22b4ed6c /Lib/test/test_wsgiref.py | |
parent | 35b7e837abeee2085e912fe31d38f867664acbe2 (diff) | |
download | cpython-a9ecbdade7271c30e691d8fab82085be68864624.zip cpython-a9ecbdade7271c30e691d8fab82085be68864624.tar.gz cpython-a9ecbdade7271c30e691d8fab82085be68864624.tar.bz2 |
Fix BytesWarning with -bb in wsgiref.headers.Headers.
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rwxr-xr-x | Lib/test/test_wsgiref.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index cea3565..cfadfbd 100755 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -426,15 +426,20 @@ class HeaderTests(TestCase): h[b"Foo"] = bytes(b"bar") self.assertEqual("bar", h.get("Foo")) + self.assertEqual("bar", h.get(b"Foo")) h.setdefault(b"Bar", b"foo") self.assertEqual("foo", h.get("Bar")) + self.assertEqual("foo", h.get(b"Bar")) h.add_header(b'content-disposition', b'attachment', filename=b'bud.gif') self.assertEqual('attachment; filename="bud.gif"', h.get("content-disposition")) + del h['content-disposition'] + self.assert_(b'content-disposition' not in h) + class ErrorHandler(BaseCGIHandler): """Simple handler subclass for testing BaseHandler""" |