Skip to content

Commit

Permalink
Merge pull request #53 from CybercentreCanada/update/test
Browse files Browse the repository at this point in the history
Update/test [dev]
  • Loading branch information
cccs-kevin committed Jan 4, 2024
2 parents 7b592d6 + b7c0064 commit 8575f25
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions tests/test_avclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,26 +363,3 @@ def test_execute(sample, target):
assert isinstance(target._av_labels.taxonomy, Taxonomy)
assert isinstance(target._av_labels.expansions, Expansion)
assert target._av_labels.avs is None

# Get the result of execute() from the test method
test_result = task.get_service_result()

# Get the assumed "correct" result of the sample
correct_result_path = os.path.join(TEST_DIR, "results", task.file_name + ".json")
with open(correct_result_path, "r") as f:
correct_result = json.loads(f.read())
f.close()

# Assert that the appropriate sections of the dict are equal

# Avoiding unique items in the response
test_result_response = test_result.pop("response")
correct_result_response = correct_result.pop("response")
assert test_result == correct_result

# Comparing everything in the response except for the service_completed and the output.json supplementary
test_result_response["milestones"].pop("service_completed")
correct_result_response["milestones"].pop("service_completed")
correct_result_response.pop("supplementary")
test_result_response.pop("supplementary")
assert test_result_response == correct_result_response

0 comments on commit 8575f25

Please sign in to comment.