 import sys <EOL> import UnitTest <EOL> import base64 <EOL> class Base64ModuleTest ( UnitTest . UnitTest ) : <EOL> def testBase64 ( self ) : <EOL> text = "<STR_LIT>" <EOL> encodetext = base64 . encodestring ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . decodestring ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . standard_b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . standard_b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . urlsafe_b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . urlsafe_b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> def testBase32 ( self ) : <EOL> text = "<STR_LIT>" <EOL> encodetext = base64 . b32encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . b32decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) 
 def testBase16 ( self ) : 
 import sys <EOL> import UnitTest <EOL> import base64 <EOL> class Base64ModuleTest ( UnitTest . UnitTest ) : <EOL> def testBase64 ( self ) : <EOL> text = "<STR_LIT>" <EOL> encodetext = base64 . encodestring ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . decodestring ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . standard_b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . standard_b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> encodetext = base64 . urlsafe_b64encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . urlsafe_b64decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> def testBase32 ( self ) : <EOL> text = "<STR_LIT>" <EOL> encodetext = base64 . b32encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . b32decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) <EOL> def testBase16 ( self ) : <EOL> text = "<STR_LIT>" <EOL> encodetext = base64 . b16encode ( text ) <EOL> self . assertEqual ( encodetext , '<STR_LIT>' ) <EOL> decodetext = base64 . b16decode ( encodetext ) <EOL> self . assertEqual ( decodetext , text ) </s>
