#NEWLINE# def test_construct( self , client ) : #NEWLINE# #INDENT# cis = AccessTokenRequest ( code = 'foo' , redirect_uri = 'http://example.com' ) #NEWLINE# csp = ClientSecretPost ( client ) #NEWLINE# http_args = csp . construct ( cis ) #NEWLINE# assert ( cis [ 'client_id' ] == 'A' ) #NEWLINE# assert ( cis [ 'client_secret' ] == 'boarding pass' ) #NEWLINE# assert ( http_args is None ) #NEWLINE# cis = AccessTokenRequest ( code = 'foo' , redirect_uri = 'http://example.com' ) #NEWLINE# http_args = csp . construct ( cis , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , http_args = { #NEWLINE# #INDENT# 'client_secret' : 'another' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( cis [ 'client_id' ] == 'A' ) #NEWLINE# assert ( cis [ 'client_secret' ] == 'another' ) #NEWLINE# assert ( cis == { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )