Ejemplo n.º 1
0
 def test_has_reaction_filter_null(self):
     f = filters.HasReactionFilter(self.request, {}, models.Answer, None)
     q = f.queryset(self.request, models.Answer.objects.all())
     self.assertEqual(q.count(), 5)
Ejemplo n.º 2
0
 def test_has_reaction_filter_yes(self):
     f = filters.HasReactionFilter(self.request, {"has_reaction": "yes"},
                                   models.Answer, None)
     q = f.queryset(self.request, models.Answer.objects.all())
     self.assertEquals(q.count(), 4)