Beispiel #1
0
 def test_should_be_able_to_chose_the_encoding(self):
     ENCODING = "IBM857"
     data = b"xpto".decode("utf-8").encode(ENCODING)
     self.assertEqual("xpto", force_text(data, encoding=ENCODING))
Beispiel #2
0
 def test_shoulde_decode_bytes(self):
     data = b"xpto"
     self.assertEqual("xpto", force_text(data))
Beispiel #3
0
 def test_should_decode_a_string(self):
     string = "Blá blá"
     self.assertEqual("Blá blá", force_text(string))
Beispiel #4
0
 def test_should_be_able_to_chose_the_encoding(self):
     ENCODING = 'IBM857'
     data = b"xpto".decode("utf-8").encode(ENCODING)
     self.assertEqual("xpto", force_text(data, encoding=ENCODING))
Beispiel #5
0
 def test_shoulde_decode_bytes(self):
     data = b"xpto"
     self.assertEqual("xpto", force_text(data))
Beispiel #6
0
 def test_should_decode_a_string(self):
     string = "Blá blá"
     self.assertEqual("Blá blá", force_text(string))