def test_quoter_char(self): """ Test if an ASCII character is quoted correctly """ char = u'A' encoded = unicode_quoter(char) self.assertEqual(char, unquote_plus(encoded))
def test_quoter_unichar(self): """ Test if a unicode character is quoted correctly """ char = u'\u9b54' encoded = unicode_quoter(char) self.assertEqual(char, unquote_plus(encoded))
def test_quoter_char(): """ Test if an ASCII character is quoted correctly """ char = 'A' encoded = unicode_quoter(char) assert char == unquote_plus(encoded)
def test_quoter_unichar(): """ Test if a unicode character is quoted correctly """ char = '\u9b54' encoded = unicode_quoter(char) assert char == unquote_plus(encoded)
def test_quoter_reserved(self): """ Test if a URI reserved character is quoted correctly """ char = u'+' encoded = unicode_quoter(char) self.assertNotEqual(char, encoded) self.assertEqual(char, unquote_plus(encoded))
def test_quoter_reserved(): """ Test if a URI reserved character is quoted correctly """ char = '+' encoded = unicode_quoter(char) assert char != encoded assert char == unquote_plus(encoded)