Skip to content

Commit

Permalink
remove "./test_data" in tests replace with test_data fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Sep 26, 2024
1 parent 2772ede commit 49c2e94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_nmdcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def test_objects(mock_api, requests_mock, site_config, test_data_dir):
n = nmdcapi(site_config)

requests_mock.post("http://localhost/objects", json={})
fn = "./test_data/afile.sha256"
fn = test_data_dir / "afile.sha256"
if os.path.exists(fn):
os.remove(fn)
afile = test_data_dir / "afile"
resp = n.create_object(str(afile), "desc", "http://localhost/")
resp = n.create_object("./test_data/afile", "desc", "http://localhost/")
resp = n.create_object(test_data_dir / "afile", "desc", "http://localhost/")
url = "http://localhost/workflows/workflow_executions"
requests_mock.post(url, json={"a": "b"})
resp = n.post_objects({"a": "b"})
Expand Down

0 comments on commit 49c2e94

Please sign in to comment.