def test_notification_mark_unseen(self): self.assertFalse(self.notification.seen) ns = NotificationSet.get_unread(self.teacher) self.assertEqual(ns.count, 1) ns = NotificationSet.get_course(self.course_instance, self.teacher) self.assertEqual(ns.count_and_mark_unseen(), 1) self.assertTrue(self.notification in ns.notifications) ns = NotificationSet.get_unread(self.teacher) self.assertEqual(ns.count, 0) ns = NotificationSet.get_course(self.course_instance, self.teacher) self.assertEqual(ns.count, 1) self.assertEqual(ns.count_and_mark_unseen(), 0)