Skip to content

Commit

Permalink
updated /v1/workflows/activities to /workflows/activities
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Babins committed Feb 15, 2024
1 parent 52cf2e9 commit e1b5273
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions nmdc_automation/api/nmdcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,8 @@ def create_object(self, fn, description, dataurl):
return resp.json()

@refresh_token
def post_objects(self, obj_data, json_obj=None):
url = self._base_url + "v1/workflows/activities"

# objects_file = open(json_obj)
# obj_data = json.load(objects_file)
def post_objects(self, obj_data):
url = self._base_url + "workflows/activities"

resp = requests.post(url, headers=self.header, data=json.dumps(obj_data))
return resp.json()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nmdcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_objects(mock_api, requests_mock):

resp = n.create_object("./test_data/afile", "desc", "http://localhost/")
# assert "checksums" in resp
url = "http://localhost/v1/workflows/activities"
url = "http://localhost/workflows/activities"
requests_mock.post(url, json={"a": "b"})
resp = n.post_objects({"a": "b"})
assert "a" in resp
Expand Down

0 comments on commit e1b5273

Please sign in to comment.