Skip to content

Commit 1ec3d97

Browse files
committed
Added unhappy path integration tests
1 parent 7706742 commit 1ec3d97

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/integration/test_ontology.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@ def test_is_feature_schema_archived(client, ontology):
1313
assert result == False
1414

1515

16+
def test_is_feature_schema_archived_for_non_existing_feature_schema(
17+
client, ontology):
18+
with pytest.raises(
19+
Exception,
20+
match="The specified feature schema was not in the ontology"):
21+
client.is_feature_schema_archived(ontology.uid,
22+
'invalid-feature-schema-id')
23+
24+
25+
def test_is_feature_schema_archived_for_non_existing_ontology(client, ontology):
26+
feature_schema_to_unarchive = ontology.normalized['tools'][0]
27+
with pytest.raises(
28+
Exception,
29+
match="Resource 'Ontology' not found for params: 'invalid-ontology'"
30+
):
31+
client.is_feature_schema_archived(
32+
'invalid-ontology', feature_schema_to_unarchive['featureSchemaId'])
33+
34+
1635
def test_delete_tool_feature_from_ontology(client, ontology):
1736
feature_schema_to_delete = ontology.normalized['tools'][0]
1837
assert len(ontology.normalized['tools']) == 2

0 commit comments

Comments
 (0)