Esempio n. 1
0
 def test_name_slug_properties(self):
     """
     Test the properties setup for NameSlug
     """
     name_slug = NameSlugConcrete(name="Something")
     name_slug.save()
     self.assertEquals(name_slug.get_slug_target(), "name")
     self.assertEquals(name_slug.__unicode__(), "Something")
     self.assertEquals(name_slug.slug, "something")
Esempio n. 2
0
 def test_name_slug_persist(self):
     """
     NameSlug models should have a persistant slug
     """
     name_slug = NameSlugConcrete(name="Something")
     name_slug.save()
     self.assertEquals(name_slug.slug, "something")
     name_slug.name = "Something Else"
     name_slug.save()
     self.assertEquals(name_slug.slug, "something")