summaryrefslogtreecommitdiff
path: root/paste/fixture.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2008-03-26 02:54:07 +0000
committerianb <devnull@localhost>2008-03-26 02:54:07 +0000
commitb0d7f9375fcce4f514fb41eab767ccb1d6b93f03 (patch)
tree42e6b73ca04855da24f2a7bf957058423cbd63cf /paste/fixture.py
parentfe678eb753629f27048e6fd8986e5db010fc5a7c (diff)
downloadpaste-b0d7f9375fcce4f514fb41eab767ccb1d6b93f03.tar.gz
Unicode TestApp Response __contains__ test works (#235)
Diffstat (limited to 'paste/fixture.py')
-rw-r--r--paste/fixture.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index 8c569f7..38b9d24 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -792,6 +792,9 @@ class TestResponse(object):
"""
if not isinstance(s, (str, unicode)):
s = str(s)
+ if isinstance(s, unicode):
+ ## FIXME: we don't know that this response uses utf8:
+ s = s.encode('utf8')
return (self.body.find(s) != -1
or self.normal_body.find(s) != -1)