summaryrefslogtreecommitdiff
path: root/tests/responses
diff options
context:
space:
mode:
authorNicolas Restrepo <nrestrepo.r05@gmail.com>2021-06-17 07:04:04 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-22 21:28:48 +0200
commitbbb3965826c91406b94b819af7315ea1d39ec217 (patch)
treede6ddcce62f1bdefc9531e48fa2448e0952099c8 /tests/responses
parent7a9745fed498f69c46a3ffa5dfaff872e0e1df89 (diff)
Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.
Diffstat (limited to 'tests/responses')
-rw-r--r--tests/responses/test_fileresponse.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/responses/test_fileresponse.py b/tests/responses/test_fileresponse.py
index 46d407bdf5..9e33df010e 100644
--- a/tests/responses/test_fileresponse.py
+++ b/tests/responses/test_fileresponse.py
@@ -89,3 +89,10 @@ class FileResponseTests(SimpleTestCase):
response.headers['Content-Disposition'],
"attachment; filename*=utf-8''%E7%A5%9D%E6%82%A8%E5%B9%B3%E5%AE%89.odt"
)
+
+ def test_repr(self):
+ response = FileResponse(io.BytesIO(b'binary content'))
+ self.assertEqual(
+ repr(response),
+ '<FileResponse status_code=200, "application/octet-stream">',
+ )