示例#1
0
 def test_encode_unicode(self):
     expected = b('Si\x0c\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')
     data = self.encode(u('привет'))
     self.assertEqual(data, expected)
示例#2
0
 def test_encode_unicode(self):
     expected = b('Si\x0c\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')
     data = self.encode(u('привет'))
     self.assertEqual(data, expected)
示例#3
0
 def test_decode_utf8(self):
     source = b('Si\x0c\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')
     data = self.decode(source)
     self.assertEqual(data, u('привет'))
示例#4
0
 def test_decode_utf8(self):
     source = b('Si\x0c\xd0\xbf\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82')
     data = self.decode(source)
     self.assertEqual(data, u('привет'))