Пример #1
0
 def test_all(self):
     self.assertEqual("do-you-know-martine-a-la-plage",
                      slugify(u"Do YOU know 'Martine à la plage' ?"))
Пример #2
0
 def test_str_to_unicode(self):
     self.assertEqual("espana", slugify("España"))
Пример #3
0
 def test_numbers(self):
     self.assertEqual("article-1", slugify(u"Article 1"))
Пример #4
0
 def test_special_chars(self):
     self.assertEqual("o-d-o-o", slugify(u"o!#d{|\o/@~o&%^?"))
Пример #5
0
 def test_caps(self):
     self.assertEqual("camelcase", slugify(u"CamelCase"))
Пример #6
0
 def test_underscore(self):
     self.assertEqual("one-two", slugify(u"one_two"))
Пример #7
0
 def test_unicode(self):
     self.assertEqual("heterogeneite", slugify(u"hétérogénéité"))
Пример #8
0
 def test_spaces(self):
     self.assertEqual("spaces", slugify(u"   spaces   "))