diff options
author | Nicolas Restrepo <nrestrepo.r05@gmail.com> | 2021-06-17 07:04:04 -0400 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-22 21:28:48 +0200 |
commit | bbb3965826c91406b94b819af7315ea1d39ec217 (patch) | |
tree | de6ddcce62f1bdefc9531e48fa2448e0952099c8 /tests/httpwrappers | |
parent | 7a9745fed498f69c46a3ffa5dfaff872e0e1df89 (diff) | |
download | django-bbb3965826c91406b94b819af7315ea1d39ec217.tar.gz |
Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r-- | tests/httpwrappers/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py index 728e879b5c..a04555b6cd 100644 --- a/tests/httpwrappers/tests.py +++ b/tests/httpwrappers/tests.py @@ -663,6 +663,13 @@ class StreamingHttpResponseTests(SimpleTestCase): r = StreamingHttpResponse(iter(['hello', 'world'])) self.assertEqual(r.getvalue(), b'helloworld') + def test_repr(self): + r = StreamingHttpResponse(iter(['hello', 'café'])) + self.assertEqual( + repr(r), + '<StreamingHttpResponse status_code=200, "text/html; charset=utf-8">', + ) + class FileCloseTests(SimpleTestCase): |