Skip to content

Commit

Permalink
Handle return values in string or unicode format
Browse files Browse the repository at this point in the history
  • Loading branch information
josephtate committed Feb 21, 2011
1 parent 1efae7b commit 5cd2667
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,4 +702,7 @@ def test_request_post_valid(self):

self.mw.config.debug = True
r = self.widget().request(req)
assert r.body == """Form posted successfully {'field2': 'b', 'field3': 'c', 'field1': 'a'}""", r.body
assert (
r.body == """Form posted successfully {'field2': 'b', 'field3': 'c', 'field1': 'a'}""" or
r.body == """Form posted successfully {'field2': u'b', 'field3': u'c', 'field1': u'a'}"""
), r.body

0 comments on commit 5cd2667

Please sign in to comment.