Пример #1
0
 def test_fake_times(self):
     """Test that running 'fake' does nothing if teh patches have already been run"""
     run()
     self.assertEqual(len(Patch.objects.all()), 2)
     t1 = [x.last_modified for x in Patch.objects.all()]
     fake()
     t2 = [x.last_modified for x in Patch.objects.all()]
     for i in range(len(t1)):
         self.assertEqual(t1[i], t2[i]) #Running fake didn't change the last_modified times
Пример #2
0
 def test_fake_times(self):
     """Test that running 'fake' does nothing if teh patches have already been run"""
     run()
     self.assertEqual(len(Patch.objects.all()), 2)
     t1 = [x.last_modified for x in Patch.objects.all()]
     fake()
     t2 = [x.last_modified for x in Patch.objects.all()]
     for i in range(len(t1)):
         self.assertEqual(
             t1[i],
             t2[i])  #Running fake didn't change the last_modified times
Пример #3
0
 def test_fake(self):
     """Test that running 'fake' creates new patches, but doesn't execute them"""
     self.assertEqual(len(Patch.objects.all()), 0)
     fake()
     self.assertEqual(len(Patch.objects.all()), 2)  #Two patches created
     self.assertEqual(len(Species.objects.all()), 0)  #No species created
Пример #4
0
 def test_fake(self):
     """Test that running 'fake' creates new patches, but doesn't execute them"""
     self.assertEqual(len(Patch.objects.all()), 0)
     fake()
     self.assertEqual(len(Patch.objects.all()), 2) #Two patches created
     self.assertEqual(len(Species.objects.all()), 0) #No species created