def test_clean_dict_equal_successful(): sample = {"three": "woohoo"} assert sample == helper.clean_dict({ "one": None, "two": "", "three": "woohoo" })
def run(self, params={}): new_results = [] try: query_job = self.connection.client.query(params.get(Input.QUERY)) results = query_job.result() for result in results: new_results.append(helper.clean_dict(result)) except GoogleAPIError as e: self.logger.error(f"Google API error: Check query: {e}") raise PluginException(cause="Google API error", assistance="Check query", data=e) return {Output.RESULT: new_results}
def test_clean_dict_no_exceptions(): helper.clean_dict({"test": "yay"})