def test_slugify(self): self.assertEqual( slugify( " Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/" ), "Jack-Jill-like-numbers-123-and-4-and-silly-characters-", )
def test_slugify_lazy_string(self): lazy_str = lazy(lambda string: string, str) self.assertEqual( slugify( lazy_str( " Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/" )), "Jack-Jill-like-numbers-123-and-4-and-silly-characters-", )
def test_non_string_input(self): self.assertEqual(slugify(123), "123")
def test_unicode(self): self.assertEqual( slugify("Un \xe9l\xe9phant \xe0 l'or\xe9e du bois"), "Un-elephant-a-loree-du-bois", )