Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

analytics: Get user by delivery email when creating users in test set up.

Lauryn Menard4e97a6d80e94
diff --git a/analytics/tests/test_counts.py b/analytics/tests/test_counts.py
index fe12a215bdb..834ef2359d9 100644
--- a/analytics/tests/test_counts.py
+++ b/analytics/tests/test_counts.py
@@ -77,7 +77,7 @@ from zerver.models.clients import get_client
from zerver.models.messages import Attachment
from zerver.models.realm_audit_logs import AuditLogEventType
from zerver.models.scheduled_jobs import NotificationTriggers
-from zerver.models.users import get_user, is_cross_realm_bot_email
+from zerver.models.users import get_user_by_delivery_email, is_cross_realm_bot_email
from zilencer.models import (
RemoteInstallationCount,
RemotePushDeviceToken,
@@ -507,8 +507,8 @@ class TestCountStats(AnalyticsTestCase):
name=f"stream {minutes_ago}", realm=self.second_realm, date_created=creation_time
)[1]
self.create_message(user, recipient, date_sent=creation_time)
- self.hourly_user = get_user("[email protected]", self.second_realm)
- self.daily_user = get_user("[email protected]", self.second_realm)
+ self.hourly_user = get_user_by_delivery_email("[email protected]", self.second_realm)
+ self.daily_user = get_user_by_delivery_email("[email protected]", self.second_realm)
# This realm should not show up in the *Count tables for any of the
# messages_* CountStats