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.

test_push_notifications: Sort pm_users list.

Tim Abbotteb3ad8356074
diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.py
index 9f50a688abf..4d6cd13119e 100644
--- a/zerver/tests/test_push_notifications.py
+++ b/zerver/tests/test_push_notifications.py
@@ -1622,8 +1622,10 @@ class TestGetAPNsPayload(PushNotificationTest):
"message_ids": [message.id],
"recipient_type": "private",
"pm_users": ",".join(
- str(s.user_profile_id)
- for s in Subscription.objects.filter(recipient=message.recipient)
+ sorted(
+ str(s.user_profile_id)
+ for s in Subscription.objects.filter(recipient=message.recipient)
+ )
),
"sender_email": self.sender.email,
"sender_id": self.sender.id,
@@ -1786,8 +1788,10 @@ class TestGetAPNsPayload(PushNotificationTest):
"message_ids": [message.id],
"recipient_type": "private",
"pm_users": ",".join(
- str(s.user_profile_id)
- for s in Subscription.objects.filter(recipient=message.recipient)
+ sorted(
+ str(s.user_profile_id)
+ for s in Subscription.objects.filter(recipient=message.recipient)
+ )
),
"sender_email": self.sender.email,
"sender_id": self.sender.id,