From 96a58c7347ac7d041058e8fb1a65ce074cc4d3ea Mon Sep 17 00:00:00 2001 From: Max Wang Date: Sat, 22 Jun 2024 13:33:14 -0400 Subject: [PATCH] Run black --- test_harness/result_collector.py | 9 +++++++-- test_harness/run.py | 4 +++- test_harness/runner/query_runner.py | 8 ++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/test_harness/result_collector.py b/test_harness/result_collector.py index 81667e5..71bffd5 100644 --- a/test_harness/result_collector.py +++ b/test_harness/result_collector.py @@ -57,10 +57,15 @@ def collect_result( result_type = self.result_types.get( get_tag(report[agent]), "Test Error" ) - if query_type in self.stats[agent] and result_type in self.stats[agent][query_type]: + if ( + query_type in self.stats[agent] + and result_type in self.stats[agent][query_type] + ): self.stats[agent][query_type][result_type] += 1 else: - self.logger.error(f"Got {query_type} and {result_type} and can't put into stats!") + self.logger.error( + f"Got {query_type} and {result_type} and can't put into stats!" + ) # add result to csv agent_results = ",".join( diff --git a/test_harness/run.py b/test_harness/run.py index 364cef3..f45a396 100644 --- a/test_harness/run.py +++ b/test_harness/run.py @@ -61,7 +61,9 @@ async def run_tests( for asset in test.test_assets: # throw out any assets with unsupported expected outputs, i.e. OverlyGeneric if asset.expected_output not in collector.query_types: - logger.warning(f"Asset id {asset.id} has unsupported expected output.") + logger.warning( + f"Asset id {asset.id} has unsupported expected output." + ) continue # create test in Test Dashboard test_id = "" diff --git a/test_harness/runner/query_runner.py b/test_harness/runner/query_runner.py index 8285f71..2755875 100644 --- a/test_harness/runner/query_runner.py +++ b/test_harness/runner/query_runner.py @@ -192,9 +192,13 @@ async def get_ars_responses( # add response to output if response is not None: status_code = response.get("fields", {}).get("code", 410) - self.logger.info(f"Got reponse for {infores} with status code {status_code}.") + self.logger.info( + f"Got reponse for {infores} with status code {status_code}." + ) responses[infores] = { - "response": response.get("fields", {}).get("data", {"message": {"results": []}}), + "response": response.get("fields", {}).get( + "data", {"message": {"results": []}} + ), "status_code": status_code, } else: