mirror of https://github.com/zulip/zulip.git
test_push_notifications: Sort pm_users list.
The production code sorts this list, so this test would fail nondeterministically if the database returned these elements in another order.
This commit is contained in:
parent
cb2d0ff32b
commit
eb3ad83560
|
@ -1622,8 +1622,10 @@ class TestGetAPNsPayload(PushNotificationTest):
|
|||
"message_ids": [message.id],
|
||||
"recipient_type": "private",
|
||||
"pm_users": ",".join(
|
||||
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(
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue