Skip to content

Commit

Permalink
Add test for run_request_dict_public function
Browse files Browse the repository at this point in the history
  • Loading branch information
noctillion committed Jul 27, 2023
1 parent e29a0c1 commit 4574e5c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from .constants import EXAMPLE_RUN, EXAMPLE_RUN_BODY

from bento_wes.db import run_request_dict_public

def _add_workflow_response(r):
with open(os.path.join(os.path.dirname(__file__), "phenopackets_json.wdl"), "r") as wf:
Expand Down Expand Up @@ -196,6 +197,14 @@ def test_runs_public_endpoint(client):
run_log = details["run_log"]
assert set(run_log.keys()) == set(expected_run_log_keys)

# Testing run_request_dict_public function
mock_run_request = {
"workflow_type": request["workflow_type"],
"tags": json.dumps(tags)
}
expected_request = run_request_dict_public(mock_run_request)
assert request == expected_request

# TODO: Get celery running for tests

# rv = client.post(f"/runs/{cr_data['run_id']}/cancel")
Expand Down

0 comments on commit 4574e5c

Please sign in to comment.