Esempio n. 1
0
 def test_resolve_url__model(self):
     """
     Tests that passing a model to ``resolve_url`` will result in
     ``get_absolute_url`` being called on that model instance.
     """
     m = UnimportantThing(importance=1)
     self.assertEqual(m.get_absolute_url(), resolve_url(m))
Esempio n. 2
0
 def test_resolve_url__model(self):
     """
     Tests that passing a model to ``resolve_url`` will result in
     ``get_absolute_url`` being called on that model instance.
     """
     m = UnimportantThing(importance=1)
     self.assertEqual(m.get_absolute_url(), resolve_url(m))
Esempio n. 3
0
 def test_commit(self):
     """
     Test of commit
     """
     m = UnimportantThing(pk=2, importance=2)
     m.save()
     compat.commit()
     self.assertEqual(UnimportantThing.objects.get(pk=2).importance, 2)
Esempio n. 4
0
 def test_commit(self):
     """
     Test of commit
     """
     m = UnimportantThing(pk=2, importance=2)
     m.save()
     compat.commit()
     self.assertEqual(UnimportantThing.objects.get(pk=2).importance, 2)
Esempio n. 5
0
 def db_action():
     m = UnimportantThing(pk=4, importance=4)
     m.save()
     return m
Esempio n. 6
0
 def db_action():
     m = UnimportantThing(pk=1, importance=1)
     m.save()
Esempio n. 7
0
 def db_action():
     m = UnimportantThing(pk=4, importance=4)
     m.save()
     return m
Esempio n. 8
0
 def db_action():
     m = UnimportantThing(pk=1, importance=1)
     m.save()