From 49c2e94e3b130b1a9133dba0ee38b43ad8cb397a Mon Sep 17 00:00:00 2001 From: Michael Thornton Date: Thu, 26 Sep 2024 15:48:27 -0700 Subject: [PATCH] remove "./test_data" in tests replace with test_data fixture --- tests/test_nmdcapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_nmdcapi.py b/tests/test_nmdcapi.py index cc60771..94d50b6 100644 --- a/tests/test_nmdcapi.py +++ b/tests/test_nmdcapi.py @@ -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"})