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)
def get_notification(self, notification_id): return Notification.get(notification_id)