Skip to content

Commit

Permalink
Merge pull request #1352 from Sage-Bionetworks/develop-fix-test
Browse files Browse the repository at this point in the history
[bug fix] Fixed tests in `test_api.py`
  • Loading branch information
linglp authored Jan 18, 2024
2 parents bddcc39 + 8d9ceb2 commit 30b3177
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def test_get_dataset_files(self,full_path, file_names, request_headers, client):
else:
if file_names:
assert ["syn23643255","Sample_A.txt"] and ["syn24226530","Sample_A.txt"] and ["syn25057024","Sample_A.txt"] in response_dt
assert ['syn23643256', 'Sample_C.txt'] and ['syn24226531', 'Sample_B.txt'] not in response_dt
else:
assert ["syn25705259","Boolean Test"] and ["syn23667202","DataTypeX_table"] in response_dt
assert ['syn23643256', 'Sample_C.txt'] and ['syn24226530', 'Sample_A.txt'] and ['syn24226531', 'Sample_B.txt'] in response_dt

@pytest.mark.synapse_credentials_needed
def test_get_storage_project_dataset(self, request_headers, client):
Expand Down Expand Up @@ -891,7 +892,7 @@ def test_visualize_tangled_tree_layers(self, client, figure_type, data_model_jso

assert response.status_code == 200

@pytest.mark.parametrize("component, response_text", [("Patient", "Component,Component,TBD,False,,,,Patient"), ("BulkRNA-seqAssay", "Component,Component,TBD,False,,,,BulkRNA-seqAssay")])
@pytest.mark.parametrize("component, response_text", [("Patient", "Component,Component,TBD,True,,,,Patient"), ("BulkRNA-seqAssay", "Component,Component,TBD,True,,,,BulkRNA-seqAssay")])
def test_visualize_component(self, client, data_model_jsonld,component, response_text):
params = {
"schema_url": data_model_jsonld,
Expand All @@ -902,7 +903,6 @@ def test_visualize_component(self, client, data_model_jsonld,component, response
response = client.get("http://localhost:3001/v1/visualize/component", query_string = params)

assert response.status_code == 200

assert "Attribute,Label,Description,Required,Cond_Req,Valid Values,Conditional Requirements,Component" in response.text
assert response_text in response.text

Expand Down

0 comments on commit 30b3177

Please sign in to comment.