#NEWLINE# def compare_req_resp( req_obj , resp_obj ) : #NEWLINE# #INDENT# for ( k , v ) in req_obj . items ( ) : #NEWLINE# #INDENT# assert ( k in resp_obj . keys ( ) ) , ( 'Key %r not in response (keys are %r)' % ( k , resp_obj . keys ( ) ) ) #NEWLINE# assert ( resp_obj [ k ] == v ) , ( 'Value for key %r should be %r but is %r' % ( k , v , resp_obj [ k ] ) )