11import os
22import unittest
33
4- import six
54from datauri import DataURI , exceptions
65
76
@@ -92,8 +91,8 @@ def test_is_base64(self):
9291 def test_text (self ):
9392 t = 'data:text/plain;name=file-1_final.txt;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu'
9493 parsed = DataURI (t )
95- self .assertTrue (isinstance (parsed .data , six . binary_type ))
96- self .assertTrue (isinstance (parsed .text , six . text_type ))
94+ self .assertTrue (isinstance (parsed .data , bytes ))
95+ self .assertTrue (isinstance (parsed .text , str ))
9796
9897 def test_wrap (self ):
9998 t = 'data:text/plain;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu'
@@ -104,9 +103,9 @@ def test_wrap(self):
104103 def test_text_no_charset (self ):
105104 t = 'data:text/plain;name=file.txt;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu'
106105 parsed = DataURI (t )
107- self .assertTrue (isinstance (parsed .data , six . binary_type ))
106+ self .assertTrue (isinstance (parsed .data , bytes ))
108107 with self .assertRaises (exceptions .InvalidCharset ):
109- self .assertTrue (isinstance (parsed .text , six . text_type ))
108+ self .assertTrue (isinstance (parsed .text , str ))
110109
111110 def test_make (self ):
112111 made = DataURI .make ('text/plain' , charset = 'us-ascii' , base64 = False , data = 'This is a message.' )
0 commit comments