From df068ae7a5e3f4ba9c88289313b01f9c5cfa6261 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sun, 16 Jul 2023 11:09:25 +0000 Subject: [PATCH] tests: Test directly for stream name. --- zerver/tests/test_push_notifications.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py index 293109cc89..8215a42b16 100644 --- a/zerver/tests/test_push_notifications.py +++ b/zerver/tests/test_push_notifications.py @@ -74,7 +74,6 @@ from zerver.models import ( UserMessage, UserTopic, get_client, - get_display_recipient, get_realm, get_stream, get_user_profile_by_id, @@ -2048,7 +2047,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2079,7 +2078,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2115,7 +2114,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2152,7 +2151,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2185,7 +2184,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2218,7 +2217,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2251,7 +2250,7 @@ class TestGetAPNsPayload(PushNotificationTest): "recipient_type": "stream", "sender_email": self.sender.email, "sender_id": self.sender.id, - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), "server": settings.EXTERNAL_HOST, @@ -2339,7 +2338,7 @@ class TestGetGCMPayload(PushNotificationTest): "sender_full_name": "King Hamlet", "sender_avatar_url": absolute_avatar_url(message.sender), "recipient_type": "stream", - "stream": get_display_recipient(message.recipient), + "stream": stream.name, "stream_id": stream.id, "topic": message.topic_name(), }