mirror of https://github.com/zulip/zulip.git
push_notifications: Provide a stable ordering.
Otherwise, this can cause test failures based on internals of the database.
This commit is contained in:
parent
53b30ed65d
commit
04450389e1
|
@ -726,7 +726,7 @@ class PushBouncerNotificationTest(BouncerTestCase):
|
||||||
)
|
)
|
||||||
android_push.assert_called_once_with(
|
android_push.assert_called_once_with(
|
||||||
user_identity,
|
user_identity,
|
||||||
list(reversed(uuid_android_tokens)),
|
uuid_android_tokens,
|
||||||
{"event": "remove", "zulip_message_ids": ",".join(str(i) for i in range(50, 250))},
|
{"event": "remove", "zulip_message_ids": ",".join(str(i) for i in range(50, 250))},
|
||||||
{},
|
{},
|
||||||
remote=server,
|
remote=server,
|
||||||
|
|
|
@ -568,7 +568,7 @@ def remote_server_notify_push(
|
||||||
user_identity.filter_q(),
|
user_identity.filter_q(),
|
||||||
kind=RemotePushDeviceToken.GCM,
|
kind=RemotePushDeviceToken.GCM,
|
||||||
server=server,
|
server=server,
|
||||||
)
|
).order_by("id")
|
||||||
)
|
)
|
||||||
if android_devices and user_id is not None and user_uuid is not None:
|
if android_devices and user_id is not None and user_uuid is not None:
|
||||||
android_devices = delete_duplicate_registrations(
|
android_devices = delete_duplicate_registrations(
|
||||||
|
@ -580,7 +580,7 @@ def remote_server_notify_push(
|
||||||
user_identity.filter_q(),
|
user_identity.filter_q(),
|
||||||
kind=RemotePushDeviceToken.APNS,
|
kind=RemotePushDeviceToken.APNS,
|
||||||
server=server,
|
server=server,
|
||||||
)
|
).order_by("id")
|
||||||
)
|
)
|
||||||
if apple_devices and user_id is not None and user_uuid is not None:
|
if apple_devices and user_id is not None and user_uuid is not None:
|
||||||
apple_devices = delete_duplicate_registrations(apple_devices, server.id, user_id, user_uuid)
|
apple_devices = delete_duplicate_registrations(apple_devices, server.id, user_id, user_uuid)
|
||||||
|
|
Loading…
Reference in New Issue