mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
test_unread: Change flag condition in get_mobile_push_notification_ids.
This uses `where_active_push_notification()` instead of the flag condition to keep it consistent with the app code as we use the same function to filter active push notifications everywhere else.
This commit is contained in:
parent
a803e68528
commit
47ece353e6
@ -458,8 +458,9 @@ class PushNotificationMarkReadFlowsTest(ZulipTestCase):
|
||||
def get_mobile_push_notification_ids(self, user_profile: UserProfile) -> List[int]:
|
||||
return list(UserMessage.objects.filter(
|
||||
user_profile=user_profile,
|
||||
flags=UserMessage.flags.active_mobile_push_notification).order_by(
|
||||
"message_id").values_list("message_id", flat=True))
|
||||
).extra(
|
||||
where=[UserMessage.where_active_push_notification()],
|
||||
).order_by("message_id").values_list("message_id", flat=True))
|
||||
|
||||
@mock.patch('zerver.lib.push_notifications.push_notifications_enabled', return_value=True)
|
||||
def test_track_active_mobile_push_notifications(self, mock_push_notifications: mock.MagicMock) -> None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user