コード例 #1
0
ファイル: test_util.py プロジェクト: vxsx/django-htmlmin
 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))
コード例 #2
0
ファイル: test_util.py プロジェクト: vxsx/django-htmlmin
 def test_shoulde_decode_bytes(self):
     data = b"xpto"
     self.assertEqual("xpto", force_text(data))
コード例 #3
0
ファイル: test_util.py プロジェクト: vxsx/django-htmlmin
 def test_should_decode_a_string(self):
     string = "Blá blá"
     self.assertEqual("Blá blá", force_text(string))
コード例 #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))
コード例 #5
0
 def test_shoulde_decode_bytes(self):
     data = b"xpto"
     self.assertEqual("xpto", force_text(data))
コード例 #6
0
 def test_should_decode_a_string(self):
     string = "Blá blá"
     self.assertEqual("Blá blá", force_text(string))