mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
tests: Remove assert_streaming_content helper in favor of getvalue.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
5901ffb0ab
commit
92c83c1df4
@@ -36,7 +36,6 @@ from django.db.migrations.executor import MigrationExecutor
|
||||
from django.db.migrations.state import StateApps
|
||||
from django.db.utils import IntegrityError
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.http.response import StreamingHttpResponse
|
||||
from django.test import TestCase
|
||||
from django.test.client import BOUNDARY, MULTIPART_CONTENT, encode_multipart
|
||||
from django.test.testcases import SerializeMixin
|
||||
@@ -1111,11 +1110,6 @@ Output:
|
||||
|
||||
return [subscription.user_profile for subscription in subscriptions]
|
||||
|
||||
def assert_streaming_content(self, response: "TestHttpResponse", result: bytes) -> None:
|
||||
assert isinstance(response, StreamingHttpResponse)
|
||||
data = b"".join(response.streaming_content)
|
||||
self.assertEqual(result, data)
|
||||
|
||||
def assert_json_success(
|
||||
self,
|
||||
result: Union["TestHttpResponse", HttpResponse],
|
||||
|
||||
Reference in New Issue
Block a user