Beispiel #1
0
 def test_absolute_url(self):
     obj = Chain(name='Test Chain 2')
     obj.save()
     self.assertEqual(str(obj.get_absolute_url()), '/chains/test-chain-2/')
Beispiel #2
0
 def test_slug_creation(self):
     obj = Chain(name='Test Chain 1')
     obj.save()
     self.assertEqual(obj.slug, 'test-chain-1')