#NEWLINE# def test_happy_path_should_return_access_token_if_valid_authorization_code( ) : #NEWLINE# #INDENT# code = request_authorization_code ( 'client-id' ) #NEWLINE# data = { #NEWLINE# #INDENT# 'grant_type' : 'authorization_code' , #NEWLINE# 'code' : code , #NEWLINE# 'redirect_uri' : 'http://callback' , #NEWLINE# #UNINDENT# } #NEWLINE# valid_headers = { #NEWLINE# #INDENT# 'Content-Type' : CONTENT_TYPE , #NEWLINE# 'Authorization' : build_basic_authorization_header ( 'client-id' , code ) , #NEWLINE# #UNINDENT# } #NEWLINE# response = requests . post ( URL , data = data , headers = valid_headers ) #NEWLINE# assert_valid_access_token ( valid_headers )