Exemplo n.º 1
0
    def testSeparator(self):
        to_sanitize = 'ámérika kápitány'
        separator = ' '
        expected = 'amerika' + separator + 'kapitany'
        self.assertEqual(expected, sanitize_string(to_sanitize, separator))
        separator = '.'
        expected = 'amerika' + separator + 'kapitany'
        self.assertEqual(expected, sanitize_string(to_sanitize, separator))

        self.assertEqual(
            'mission.impossible.rogue.nation',
            sanitize_string('Mission: Impossible - Rogue Nation', '.'))
Exemplo n.º 2
0
 def testSanitizeString(self):
     self.assertEqual('alma', sanitize_string('alma'))
     self.assertEqual('alma', sanitize_string('álma'))
     self.assertEqual(
         'amerika_kapitany',
         sanitize_string('ámérika kápitány'))