예제 #1
0
 def test_retrieve_by_order(self):
     try:
         fp = FlatPageFactory.create_batch(5)
         for index, flatpage in enumerate(FlatPage.objects.all()):
             if index == 0:
                 continue
             self.assertGreater(flatpage.order, int(fp[index - 1].order))
     finally:
         for f in fp:
             f.clean()
예제 #2
0
 def test_retrieve_by_id_if_order_is_the_same(self):
     try:
         fp = FlatPageFactory.create_batch(5, order=0)
         for index, flatpage in enumerate(FlatPage.objects.all()):
             if index == 0:
                 continue
             self.assertGreater(flatpage.id, fp[index - 1].id)
     finally:
         for f in fp:
             f.clean()
예제 #3
0
 def test_retrieve_by_id_if_order_is_the_same(self):
     try:
         fp = FlatPageFactory.create_batch(5, order=0)
         for index, flatpage in enumerate(FlatPage.objects.all()):
             if index == 0:
                 continue
             self.assertGreater(flatpage.id, fp[index - 1].id)
     finally:
         for f in fp:
             f.clean()
예제 #4
0
 def test_retrieve_by_order(self):
     try:
         fp = FlatPageFactory.create_batch(5)
         for index, flatpage in enumerate(FlatPage.objects.all()):
             if index == 0:
                 continue
             self.assertGreater(flatpage.order, int(fp[index - 1].order))
     finally:
         for f in fp:
             f.clean()
예제 #5
0
 def setUp(self):
     FlatPageFactory.create_batch(10, published=True)
     FlatPageFactory.create(published=False)
예제 #6
0
 def setUp(self):
     FlatPageFactory.create_batch(10, published=True)
     FlatPageFactory.create(published=False)
예제 #7
0
파일: tests.py 프로젝트: Pitchs/Geotrek
 def setUp(self):
     FlatPageFactory.create_batch(10)