#NEWLINE# def assert_bad_request_for_required_parameter( url , missing_parameter ) : #NEWLINE# #INDENT# resp = requests . get ( url , allow_redirects = False ) #NEWLINE# body = parse_json_response ( resp ) #NEWLINE# expected_body = { #NEWLINE# #INDENT# 'error' : 'invalid_request' , #NEWLINE# 'error_description' : ( 'Parameter %s is required' % missing_parameter ) , #NEWLINE# #UNINDENT# } #NEWLINE# assert ( 400 == resp . status_code ) #NEWLINE# assert ( expected_body == body )