Beispiel #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)
 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)
Beispiel #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('привет'))
 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('привет'))