def to_utf8(self): res = to_utf8(unicode('éééé')) self.assertEqual(isinstance(res, string), True) res = to_utf8('abcdef') self.assertEqual(isinstance(res, string), True)
def test_to_utf8(self): res = webapp2.to_utf8('ábcdéf'.decode('utf-8')) self.assertEqual(isinstance(res, str), True) res = webapp2.to_utf8('abcdef') self.assertEqual(isinstance(res, str), True)