mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.
This commit is contained in:
parent
7a9745fed4
commit
bbb3965826
3 changed files with 21 additions and 0 deletions
|
|
@ -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">',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue