Exemple #1
0
 def test_translit_no_double_dash(self):
     title = "double  space  here"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "double-space-here")
Exemple #2
0
 def test_translit_not_ends_with_dash(self):
     title = "many spaces      "
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "many-spaces")
Exemple #3
0
 def test_translit_preserves_numbers(self):
     title = "title 1"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title-1")
Exemple #4
0
 def test_translit_removes_non_alnum(self):
     title = "hey! is it title?"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "hey-is-it-title")
Exemple #5
0
 def test_tranlit_space_to_dash(self):
     title = "title title title"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title-title-title")
Exemple #6
0
 def test_translit_rus_to_eng(self):
     title = "строка"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "stroka")
Exemple #7
0
 def test_translit_uppercase_lowered(self):
     title = "TITLE"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title")