#NEWLINE# def test_main( self ) : #NEWLINE# #INDENT# real_acct = 'AUTH_real' #NEWLINE# fake_acct = 'AUTH_fake' #NEWLINE# self . _account_request ( real_acct , 'POST' , { #NEWLINE# #INDENT# 'X-Account-Meta-Bert' : 'Ernie' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( real_headers , real_body ) = self . _get ( real_acct ) #NEWLINE# ( fake_headers , fake_body ) = self . _get ( fake_acct ) #NEWLINE# self . assertEqual ( real_body , fake_body ) #NEWLINE# self . assertEqual ( real_headers [ 'content-type' ] , fake_headers [ 'content-type' ] ) #NEWLINE# ( real_headers , real_body ) = self . _get ( real_acct , headers = { #NEWLINE# #INDENT# 'Accept' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( fake_headers , fake_body ) = self . _get ( fake_acct , headers = { #NEWLINE# #INDENT# 'Accept' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( real_body , fake_body ) #NEWLINE# self . assertEqual ( real_headers [ 'content-type' ] , fake_headers [ 'content-type' ] ) #NEWLINE# ( real_headers , real_body ) = self . _get ( real_acct , headers = { #NEWLINE# #INDENT# 'Accept' : 'application/xml' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( fake_headers , fake_body ) = self . _get ( fake_acct , headers = { #NEWLINE# #INDENT# 'Accept' : 'application/xml' , #NEWLINE# #UNINDENT# } ) #NEWLINE# real_body = re . sub ( 'AUTH_\\w{4}' , 'AUTH_someaccount' , real_body ) #NEWLINE# fake_body = re . sub ( 'AUTH_\\w{4}' , 'AUTH_someaccount' , fake_body ) #NEWLINE# self . assertEqual ( real_body , fake_body ) #NEWLINE# self . assertEqual ( real_headers [ 'content-type' ] , fake_headers [ 'content-type' ] )