mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #24121 -- Added __repr__() to StreamingHttpResponse and subclasses.
This commit is contained in:
committed by
Mariusz Felisiak
parent
7a9745fed4
commit
bbb3965826
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user