Skip to content

Commit

Permalink
review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dapineyro committed Jan 16, 2025
1 parent 43f8b1c commit 354bf28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cloudos/clos.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def get_curated_workflow_list(self, workspace_id, get_all=True, page=1, verify=T
"apikey": self.apikey
}
r = retry_requests_get(
"{}/api/v3/workflows?search=&groups[]=curated&page={}&teamId={}".format(
"{}/api/v3/workflows?search=&groups[]=curated&groups[]=featured&groups[]=predefined&page={}&teamId={}".format(
self.cloudos_url, page, workspace_id),
headers=headers, verify=verify)
if r.status_code >= 400:
Expand Down Expand Up @@ -540,7 +540,8 @@ def is_module(self, workflow_name, workspace_id, verify=True):
'data-factory',
'data-factory-omics-etl',
'drug-discovery',
'data-factory-omics-insights'
'data-factory-omics-insights',
'intermediate'
]
if group.values[0] in module_groups:
return True
Expand Down
6 changes: 3 additions & 3 deletions tests/test_clos/test_get_curated_workflow_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def test_get_curated_workflow_list_correct_response():
"""
create_json = load_json_file(OUTPUT)
params = {"teamId": WORKSPACE_ID,
"groups[]": "curated",
"groups[]": ["curated", "featured", "predefined"],
"page": PAGE}
header = {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"apikey": APIKEY}
search_str = f"search=&groups[]=curated&page={PAGE}&teamId={WORKSPACE_ID}"
search_str = f"search=&groups[]=curated&groups[]=featured&groups[]=predefined&page={PAGE}&teamId={WORKSPACE_ID}"
# mock GET method with the .json
responses.add(
responses.GET,
Expand Down Expand Up @@ -57,7 +57,7 @@ def test_get_curated_workflow_list_incorrect_response():
error_message = {"statusCode": 400, "code": "BadRequest",
"message": "Bad Request.", "time": "2022-11-23_17:31:07"}
error_json = json.dumps(error_message)
search_str = f"search=&groups[]=curated&page={PAGE}&teamId={WORKSPACE_ID}"
search_str = f"search=&groups[]=curated&groups[]=featured&groups[]=predefined&page={PAGE}&teamId={WORKSPACE_ID}"
# mock GET method with the .json
responses.add(
responses.GET,
Expand Down

0 comments on commit 354bf28

Please sign in to comment.