Skip to content

Commit

Permalink
Add json keyword in tests calling invoke endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
heisner-tillman committed Feb 15, 2024
1 parent 9ec5a9e commit f92a0e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -6633,7 +6633,7 @@ def test_parameter_substitution_validation_value_errors_0(self):
history=f"hist_id={history_id}", parameters=dumps(dict(validation_repeat={"r2_0|text": ""}))
)
url = f"workflows/{workflow_id}/invocations"
invocation_response = self._post(url, data=workflow_request)
invocation_response = self._post(url, data=workflow_request, json=True)
# Take a valid stat and make it invalid, assert workflow won't run.
self._assert_status_code_is(invocation_response, 400)

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_test/base/populators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ def validate_invocation_crate_directory(self, crate_directory):

def invoke_workflow_raw(self, workflow_id: str, request: dict, assert_ok: bool = False) -> Response:
url = f"workflows/{workflow_id}/invocations"
invocation_response = self._post(url, data=request)
invocation_response = self._post(url, data=request, json=True)
if assert_ok:
invocation_response.raise_for_status()
return invocation_response
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_workflow_handler_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _invoke_n_workflows(self, n, history_id: str):
request["inputs_by"] = "step_index"
url = f"workflows/{workflow_id}/invocations"
for _ in range(n):
self._post(url, data=request)
self._post(url, data=request, json=True)

def _get_workflow_invocations(self, history_id: str):
# Consider exposing handler via the API to reduce breaking
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_workflow_scheduling_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test(self):
request["inputs"] = dumps(index_map)
request["inputs_by"] = "step_index"
url = f"workflows/{workflow_id}/invocations"
invocation_response = self._post(url, data=request)
invocation_response = self._post(url, data=request, json=True)
invocation_url = url + "/" + invocation_response.json()["id"]
time.sleep(5)
state = self._get(invocation_url).json()["state"]
Expand Down

0 comments on commit f92a0e9

Please sign in to comment.