summaryrefslogtreecommitdiff
path: root/tests/httpwrappers
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-11-23 17:03:43 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-11-23 17:03:43 +0100
commita480f8320a5b36501bfd0e8cd70b8dc04adf2d08 (patch)
treea05240468a2567b090a1985255589a8fd6181f1c /tests/httpwrappers
parent1124e163403a1d474016cfc3cf9173eb44349e34 (diff)
Simplified iteration in HTTP response objects.
Fixed #20187 -- Allowed repeated iteration of HttpResponse. All this became possible when support for old-style streaming responses was finally removed.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r--tests/httpwrappers/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
index ccea20f9c5..06b29f89b9 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -356,10 +356,10 @@ class HttpResponseTests(unittest.TestCase):
r = HttpResponse(iter(['hello', 'world']))
self.assertEqual(r.content, r.content)
self.assertEqual(r.content, b'helloworld')
- # accessing the iterator works (once) after accessing .content
+ # __iter__ can safely be called multiple times (#20187).
self.assertEqual(b''.join(r), b'helloworld')
- self.assertEqual(b''.join(r), b'')
- # accessing .content still works
+ self.assertEqual(b''.join(r), b'helloworld')
+ # Accessing .content still works.
self.assertEqual(r.content, b'helloworld')
# Accessing .content also works if the response was iterated first.