Skip to content

Commit aebe40c

Browse files
jirhikerCopilot
andauthored
Update tests/test_well_inventory.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 366a71f commit aebe40c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/test_well_inventory.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ def test_well_inventory_db_contents():
8282
for row in reader:
8383
file_dict[row["well_name_point_id"]] = row
8484

85-
response = client.post(
86-
"/well-inventory-csv",
87-
files={"file": open(file, "rb")},
88-
)
85+
with open(file, "rb") as fh:
86+
response = client.post(
87+
"/well-inventory-csv",
88+
files={"file": fh},
89+
)
8990

9091
assert (
9192
response.status_code == 201

0 commit comments

Comments
 (0)