Skip to content

Commit e7f96d4

Browse files
committed
Add test
1 parent b6e3f88 commit e7f96d4

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/galaxy_test/api/test_landing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ def test_create_private_workflow_landing_anonymous_user(self):
106106
_cannot_claim_request(self.dataset_populator, response)
107107
_cannot_use_request(self.dataset_populator, response)
108108

109+
@skip_without_tool("cat1")
110+
def test_workflow_landing_uniform_response(self):
111+
request = _get_simple_landing_payload(self.workflow_populator, public=True)
112+
response = self.dataset_populator.create_workflow_landing(request)
113+
landing_request = self.dataset_populator.use_workflow_landing_raw(response.uuid)
114+
# Make sure url is turned into location
115+
assert landing_request["request_state"]["WorkflowInput1"]["location"]
116+
109117
def test_landing_claim_preserves_source_metadata(self):
110118
request = CreateWorkflowLandingRequestPayload(
111119
workflow_id="https://dockstore.org/api/ga4gh/trs/v2/tools/#workflow/github.com/iwc-workflows/chipseq-pe/main/versions/v0.12",

lib/galaxy_test/base/populators.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,12 @@ def use_workflow_landing(self, uuid: UUID4) -> WorkflowLandingRequest:
883883
api_asserts.assert_status_code_is(landing_reponse, 200)
884884
return WorkflowLandingRequest.model_validate(landing_reponse.json())
885885

886+
def use_workflow_landing_raw(self, uuid: UUID4):
887+
url = f"workflow_landings/{uuid}"
888+
landing_reponse = self._get(url, {"client_secret": "foobar"})
889+
api_asserts.assert_status_code_is(landing_reponse, 200)
890+
return landing_reponse.json()
891+
886892
def create_tool_from_path(self, tool_path: str) -> Dict[str, Any]:
887893
tool_directory = os.path.dirname(os.path.abspath(tool_path))
888894
payload = dict(

0 commit comments

Comments
 (0)