summaryrefslogtreecommitdiff
path: root/cherrypy/test/test_encoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/test/test_encoding.py')
-rw-r--r--cherrypy/test/test_encoding.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cherrypy/test/test_encoding.py b/cherrypy/test/test_encoding.py
index ab24ab93..26b0aa18 100644
--- a/cherrypy/test/test_encoding.py
+++ b/cherrypy/test/test_encoding.py
@@ -50,6 +50,8 @@ class EncodingTests(helper.CPWebCase):
cherrypy.response.cookie['candy']['domain'] = 'cherrypy.org'
cherrypy.response.headers[
'Some-Header'] = 'My d\xc3\xb6g has fleas'
+ cherrypy.response.headers[
+ 'Bytes-Header'] = b'Bytes given header'
return 'Any content'
@cherrypy.expose
@@ -424,3 +426,8 @@ class EncodingTests(helper.CPWebCase):
def test_UnicodeHeaders(self):
self.getPage('/cookies_and_headers')
self.assertBody('Any content')
+
+ def test_BytesHeaders(self):
+ self.getPage('/cookies_and_headers')
+ self.assertBody('Any content')
+ self.assertHeader('Bytes-Header', 'Bytes given header')