Ejemplo n.º 1
0
 def test_translit_no_double_dash(self):
     title = "double  space  here"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "double-space-here")
Ejemplo n.º 2
0
 def test_translit_not_ends_with_dash(self):
     title = "many spaces      "
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "many-spaces")
Ejemplo n.º 3
0
 def test_translit_preserves_numbers(self):
     title = "title 1"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title-1")
Ejemplo n.º 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")
Ejemplo n.º 5
0
 def test_tranlit_space_to_dash(self):
     title = "title title title"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title-title-title")
Ejemplo n.º 6
0
 def test_translit_rus_to_eng(self):
     title = "строка"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "stroka")
Ejemplo n.º 7
0
 def test_translit_uppercase_lowered(self):
     title = "TITLE"
     #
     result = publish.translit(title)
     #
     self.assertEqual(result, "title")