示例#1
0
 def test_num_suffix(self):
     self.assertEqual('slug13', slugify('slug', suffix=13))
示例#2
0
 def test_non_ascii(self):
     self.assertEqual('_', slugify('Рекомендация'))
示例#3
0
 def test_limit(self):
     self.assertEqual(
         'abcdefghij', slugify('ABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10))
示例#4
0
 def test_already_slugged(self):
     self.assertEqual('foo', slugify('foo'))
示例#5
0
 def test_long_string(self):
     self.assertEqual(
         'abcdefghijklmnopqrstuvwxyz-abcdefghijklmnopqrstuvw',
         slugify('ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz'))
示例#6
0
 def test_num_suffix(self):
     self.assertEqual('slug13', slugify('slug', suffix=13))
示例#7
0
 def test_limit(self):
     self.assertEqual('abcdefghij',
                      slugify('ABCDEFGHIJKLMNOPQRSTUVWXYZ', length=10))
示例#8
0
 def test_non_ascii(self):
     self.assertEqual('_', slugify("Рекомендация"))
示例#9
0
 def test_long_string(self):
     self.assertEqual(
         'abcdefghijklmnopqrstuvwxyz-abcdefghijklmnopqrstuvw',
         slugify('ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz'))
示例#10
0
 def test_already_slugged(self):
     self.assertEqual('foo', slugify('foo'))