def test_mark_an_already_read_notification_is_ignored(self):
        notification = Notification.query.by_user('peter').first()
        notification_id = notification.notification_id

        self.center.mark_notification_as_read(notification_id)
        self.assertTrue(Notification.get(notification_id).is_read)

        self.center.mark_notification_as_read(notification_id)
        self.assertTrue(Notification.get(notification_id).is_read)
Esempio n. 2
0
    def test_mark_an_already_read_notification_is_ignored(self):
        notification = Notification.query.by_user('peter').first()
        notification_id = notification.notification_id

        self.center.mark_notification_as_read(notification_id)
        self.assertTrue(Notification.get(notification_id).is_read)

        self.center.mark_notification_as_read(notification_id)
        self.assertTrue(Notification.get(notification_id).is_read)
Esempio n. 3
0
 def get_notification(self, notification_id):
     return Notification.get(notification_id)
Esempio n. 4
0
 def get_notification(self, notification_id):
     return Notification.get(notification_id)