Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
update with review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Rwolfe-Nava committed Aug 13, 2024
1 parent e45969b commit 4ab4dc2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,20 @@ def test_export_opportunity_data_task(
]
)

expected_opportunity_ids = set([opp.opportunity_id for opp in opportunities])
# Verify csv file contents
with file_util.open_stream(export_opportunity_data_task.csv_file, "r") as infile:
reader = csv.DictReader(infile)
assert set([opp.opportunity_id for opp in opportunities]) == set(
assert expected_opportunity_ids == set(
[int(record["opportunity_id"]) for record in reader]
)

# Verify JSON file contents
with file_util.open_stream(export_opportunity_data_task.json_file, "r") as infile:
# Parse JSON File
print("JSON OPPORTUNITIES:")
json_opportunities = json.load(infile)

assert set([opp.opportunity_id for opp in opportunities]) == set(
assert expected_opportunity_ids == set(
[int(record["opportunity_id"]) for record in json_opportunities["opportunities"]]
)

Expand Down

0 comments on commit 4ab4dc2

Please sign in to comment.