Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TraciebelWairimu committed Feb 27, 2024
1 parent d213975 commit 26596a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion importer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def write_csv(data, resource_type, fieldnames):
logging.info("Writing to csv file")
current_time = datetime.now().strftime("%Y-%m-%d-%H-%M")
csv_file = f"csv/exports/{current_time}-export_{resource_type}.csv"
with open(csv_file, "w", newline="") as file:
with open(csv_file, 'w', newline='') as file:
csv_writer = csv.writer(file)
csv_writer.writerow(fieldnames)
csv_writer.writerows(data)
Expand Down
4 changes: 3 additions & 1 deletion importer/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,11 @@ def test_export_resource_to_csv(
[
"City1",
"active",
"update",
"ba787982-b973-4bd5-854e-eacbe161e297",
"ba787 982-b973-4bd5-854e-eacbe161e297",
"test location-1",
"Location/18fcbc2e-4240-4a84-a270-7a444523d7b6",
"18fcbc2e-4240-4a84-a270-7a444523d7b6",
"Jurisdiction",
"jdn",
"Jurisdiction",
Expand All @@ -475,6 +476,7 @@ def test_export_resource_to_csv(
test_elements = [
"name",
"status",
"method",
"id",
"identifier",
"parentName",
Expand Down

0 comments on commit 26596a8

Please sign in to comment.