#NEWLINE# def setBase64( self ) : #NEWLINE# #INDENT# wrong_test_string = 'I am sooooo not base64 encoded.' #NEWLINE# right_test_string = 'Base64 <3 all around!' #NEWLINE# enc = base64 . encodestring ( right_test_string ) #NEWLINE# self . assertRaises ( self . att . setBase64 ( wrong_test_string ) ) #NEWLINE# self . assertEqual ( self . att . json [ 'ContentBytes' ] , 'dGVzdGluZyB3MDB0IQ==\n' ) #NEWLINE# self . att . setBase64 ( enc ) #NEWLINE# self . assertEqual ( self . att . json [ 'ContentBytes' ] , enc )