#NEWLINE# def test_construct_with_headers( self , client ) : #NEWLINE# #INDENT# request_args = { #NEWLINE# #INDENT# 'access_token' : 'Sesame' , #NEWLINE# #UNINDENT# } #NEWLINE# bh = BearerHeader ( client ) #NEWLINE# http_args = bh . construct ( request_args = request_args , http_args = { #NEWLINE# #INDENT# 'headers' : { #NEWLINE# #INDENT# 'x-foo' : 'bar' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert _eq ( http_args . keys ( ) , [ 'headers' ] ) #NEWLINE# assert _eq ( http_args [ 'headers' ] . keys ( ) , [ 'Authorization' , 'x-foo' ] ) #NEWLINE# assert ( request_args [ 'headers' ] [ 'Authorization' ] == 'Bearer Sesame' )