Skip to content

Commit 3548045

Browse files
committed
Added unhappy path integration tests
1 parent bbc9e4f commit 3548045

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/integration/test_ontology.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ def test_unarchive_feature_schema_node(client, ontology):
1313
assert result == True
1414

1515

16+
def test_unarchive_feature_schema_node_for_non_existing_feature_schema(
17+
client, ontology):
18+
with pytest.raises(
19+
Exception,
20+
match=
21+
"Failed to find feature schema node by id: invalid-feature-schema-id"
22+
):
23+
client.unarchive_feature_schema_node(ontology.uid,
24+
'invalid-feature-schema-id')
25+
26+
27+
def test_unarchive_feature_schema_node_for_non_existing_ontology(
28+
client, ontology):
29+
feature_schema_to_unarchive = ontology.normalized['tools'][0]
30+
with pytest.raises(Exception,
31+
match="Failed to find ontology by id: invalid-ontology"):
32+
client.unarchive_feature_schema_node(
33+
'invalid-ontology', feature_schema_to_unarchive['featureSchemaId'])
34+
35+
1636
def test_delete_tool_feature_from_ontology(client, ontology):
1737
feature_schema_to_delete = ontology.normalized['tools'][0]
1838
assert len(ontology.normalized['tools']) == 2

0 commit comments

Comments
 (0)