Exemplo 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))
Exemplo 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))
Exemplo 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)
Exemplo 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)
Exemplo n.º 5
0
 def db_action():
     m = UnimportantThing(pk=4, importance=4)
     m.save()
     return m
Exemplo n.º 6
0
 def db_action():
     m = UnimportantThing(pk=1, importance=1)
     m.save()
Exemplo n.º 7
0
 def db_action():
     m = UnimportantThing(pk=4, importance=4)
     m.save()
     return m
Exemplo n.º 8
0
 def db_action():
     m = UnimportantThing(pk=1, importance=1)
     m.save()