Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
 def test_message_mark_all_ajax(self):
     self.ajax_request()
     self.assertAjaxRequestOkay(message_mark_all_read(self.request))
Пример #4
0
 def test_message_mark_all_ajax(self):
     self.ajax_request()
     self.assertAjaxRequestOkay(message_mark_all_read(self.request))