Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewelamb committed Jan 19, 2024
1 parent 28513cc commit 81bfc6d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def get_node_properties_from_schematic(
node_label (str): The label of the node
Returns:
list[NodeProperty]: A list of properties of the node
list[str]: A list of properties of the node
"""
schema_explorer = SchemaExplorer()
schema_explorer.load_schema(schema_url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
from schematic_api.test import BaseTestCase

from .conftest import (
GET_ACCESS_TOKEN_MOCK,
CREATE_MANIFESTS_MOCK,
CREATE_SINGLE_MANIFEST_MOCK,
TEST_SCHEMA_URL,
)

Expand Down Expand Up @@ -36,25 +34,6 @@
]


class TestGenerateExcelManifest(BaseTestCase):
"""Tests excel manifest endpoint"""

def test_success(self) -> None:
"""Test for successful result"""
with patch(GET_ACCESS_TOKEN_MOCK):
with patch(CREATE_SINGLE_MANIFEST_MOCK):
url = (
f"{GENERATE_EXCEL_MANIFEST_URL}"
"&datasetId=syn1"
"&assetViewId=syn2"
"&nodeLabel=node_label"
)
response = self.client.open(url, method="GET", headers=HEADERS)
self.assert200(
response, f"Response body is : {response.data.decode('utf-8')}"
)


class TestGenerateGoogleSheetManifests(BaseTestCase):
"""Tests google sheet manifest endpoint"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
NODE_IS_REQUIRED_URL = "/api/v1/nodes/FamilyHistory/isRequired?schemaUrl="
PROPERTY_LABEL_URL = "/api/v1/nodes/node_label/propertyLabel?schemaUrl="
SCHEMA_ATTRIBUTES_URL = "/api/v1/schemaAttributes?schemaUrl="
NODE_PROPERTY_ARRAY_URL = "/api/v1/nodes/MolecularEntity/nodePropertyArray?schemaUrl="
NODE_PROPERTY_ARRAY_URL = "/api/v1/nodes/Patient/nodePropertyArray?schemaUrl="
NODE_VALIDATION_RULE_ARRAY_URL = (
"/api/v1/nodes/CheckRegexList/validationRuleArray?schemaUrl="
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class TestGetNodePropertyArray:
def test_success(self, test_schema_url: str) -> None:
"""Test for successful result"""
result, status = get_node_property_array(
node_label="MolecularEntity",
node_label="Patient",
schema_url=test_schema_url,
)
assert status == 200
Expand All @@ -184,7 +184,7 @@ def test_success(self, test_schema_url: str) -> None:
def test_internal_error(self) -> None:
"""Test for 500 result"""
result, status = get_node_property_array(
node_label="MolecularEntity",
node_label="Patient",
schema_url="not_a_url",
)
assert status == 500
Expand Down

0 comments on commit 81bfc6d

Please sign in to comment.