def test_message_mark_all_read(self): m1 = G(Monit, user=G(User), read=False) m2 = G(Monit, user=self.user, read=False) self.assertUnread() res = message_mark_all_read(self.request) self.assertRead() self.assertEquals(Monit.objects.get(pk=m1.pk).read, False) self.assertEquals(Monit.objects.get(pk=m2.pk).read, True)
def test_message_mark_all_ajax(self): self.ajax_request() self.assertAjaxRequestOkay(message_mark_all_read(self.request))