def _api_call(self, url, response_checker): """ call the api and check against previous results the query is writen in a file """ if self.check_ref: # only check consistency filename = self.get_file_name() assert utils.check_reference_consistency(filename, response_checker) return response, url, _ = utils.request(url) filtered_response = response_checker.filter(response) filename = self._save_response(url, response, filtered_response) utils.compare_with_ref(filtered_response, filename, response_checker)