def test_slugify(self): """ Test the ``slugify`` method. """ # Cloned from Django tests suite output = slugify(' Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/') self.assertEqual('jack-jill-like-numbers-123-and-4-and-silly-characters', output) output = slugify("Un \xe9l\xe9phant \xe0 l'or\xe9e du bois") self.assertEqual('un-elephant-a-loree-du-bois', output)
def test_slugify(self): """ Test the ``slugify`` method. """ # Cloned from Django tests suite output = slugify( ' Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/' ) self.assertEqual( 'jack-jill-like-numbers-123-and-4-and-silly-characters', output) output = slugify("Un \xe9l\xe9phant \xe0 l'or\xe9e du bois") self.assertEqual('un-elephant-a-loree-du-bois', output)
def test_slugify_no_value_trailing_whitespaces(self): """ Test the ``slugify`` method without value. """ output = slugify(' ') self.assertEqual('', output)
def test_slugify_no_value(self): """ Test the ``slugify`` method without value. """ output = slugify('') self.assertEqual('', output)