mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[4.2.x] Refs #34342 -- Added tests for handling sync streaming responses by test client.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Backport of bfb8fda3e6 from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
e1c74bf458
commit
1ecbc04624
@@ -253,7 +253,7 @@ class AdminActionsTest(TestCase):
|
||||
response = self.client.post(
|
||||
reverse("admin:admin_views_externalsubscriber_changelist"), action_data
|
||||
)
|
||||
content = b"".join(response.streaming_content)
|
||||
content = b"".join(list(response))
|
||||
self.assertEqual(content, b"This is the content of the file")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user