summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/regressiontests/httpwrappers/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
index 8fa5cdc9f3..31b956a99d 100644
--- a/tests/regressiontests/httpwrappers/tests.py
+++ b/tests/regressiontests/httpwrappers/tests.py
@@ -415,7 +415,9 @@ UnicodeEncodeError: ..., HTTP response headers must be in US-ASCII format
The response also converts unicode keys to strings.
>>> r[u'test'] = 'testing key'
->>> list(sorted(r.items()))[1]
+>>> l = list(r.items())
+>>> l.sort()
+>>> l[1]
('test', 'testing key')
It will also raise errors for keys with non-ascii data.