Ejemplo n.º 1
0
 def test_qs_generator_inequality(self):
     """
     Each QuerySet-returning method's return value is unique.
     """
     qs = QuerySetMock(None, 1, 2, 3)
     self.assertNotEquals(qs.all(), qs.filter())
     self.assertNotEquals(qs.filter(), qs.order_by())
Ejemplo n.º 2
0
 def test_qs_generator_inequality(self):
     """
     Each QuerySet-returning method's return value is unique.
     """
     qs = QuerySetMock(None, 1, 2, 3)
     self.assertNotEquals(qs.all(), qs.filter())
     self.assertNotEquals(qs.filter(), qs.order_by())
Ejemplo n.º 3
0
 def test_qs_method_takes_arg(self):
     """
     QS-returning methods are impotent, but they do take args.
     """
     qs = QuerySetMock(None, 1, 2, 3)
     self.assertEquals(list(qs.order_by('something')), [1, 2, 3])
Ejemplo n.º 4
0
 def test_qs_method_takes_arg(self):
     """
     QS-returning methods are impotent, but they do take args.
     """
     qs = QuerySetMock(None, 1, 2, 3)
     self.assertEquals(list(qs.order_by('something')), [1, 2, 3])