Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_import_export: Tighten function signatures with generic QuerySet.
Zixuan James Li5a934ef39fc4
diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.pyindex 35a63616868..f40f6e4b69f 100644--- a/zerver/tests/test_import_export.py+++ b/zerver/tests/test_import_export.py@@ -7,6 +7,7 @@ from unittest.mock import patchimport orjsonfrom django.conf import settingsfrom django.db.models import Q+from django.db.models.query import QuerySetfrom django.utils.timezone import now as timezone_nowfrom analytics.models import UserCount@@ -1078,7 +1079,7 @@ class RealmImportExportTest(ExportFile):return {"key": bot_config_data.key, "data": bot_config_data.value}# test messages- def get_stream_messages(r: Realm) -> Message:+ def get_stream_messages(r: Realm) -> QuerySet[Message]:recipient = get_recipient_stream(r)messages = Message.objects.filter(recipient=recipient)return messages