def the_requests_of_the_mock_has_the_key_with_the_value( step, number_request, key, value): assert check_key_value( world.mock_data.json()['requests'][world.mock_data.json( )['requests'].keys()[0]][int(number_request) - 1], key, value ) is False, 'The key {key} is in the response and has the value {value}. \ Response: {response}'.format( key=key, value=value, response=world.responses[world.response_count])
def the_requests_of_the_mock_has_the_key_with_the_value(step, number_request, key, value): assert check_key_value(world.mock_data.json()['requests'][world.mock_data.json()['requests'].keys()[0]][int(number_request)-1], key, value) is False, 'The key {key} is in the response and has the value {value}. \ Response: {response}'.format( key=key, value=value, response=world.responses[world.response_count])
def check_the_response_has_the_key_with_the_value(step, key, value): assert check_key_value(world.responses[world.response_count].json(), key, value), 'The key {key} is not in the response or has not the value {value}. \ Response: {response}'.format( key=key, value=value, response=world.responses[world.response_count])