66import time
77
88
9- def test_unarchive_feature_schema_node (client , ontology ):
10- feature_schema_to_unarchive = ontology .normalized ['tools' ][0 ]
11- result = client .unarchive_feature_schema_node (
12- ontology .uid , feature_schema_to_unarchive ['featureSchemaId' ])
13- assert result == True
14-
15-
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-
369def test_delete_tool_feature_from_ontology (client , ontology ):
3710 feature_schema_to_delete = ontology .normalized ['tools' ][0 ]
3811 assert len (ontology .normalized ['tools' ]) == 2
@@ -236,3 +209,29 @@ def test_ontology_create_read(client, rand_gen):
236209 assert _get_attr_stringify_json (created_ontology ,
237210 attr ) == _get_attr_stringify_json (
238211 queried_ontology , attr )
212+
213+ def test_unarchive_feature_schema_node (client , ontology ):
214+ feature_schema_to_unarchive = ontology .normalized ['tools' ][0 ]
215+ result = client .unarchive_feature_schema_node (
216+ ontology .uid , feature_schema_to_unarchive ['featureSchemaId' ])
217+ assert result == True
218+
219+
220+ def test_unarchive_feature_schema_node_for_non_existing_feature_schema (
221+ client , ontology ):
222+ with pytest .raises (
223+ Exception ,
224+ match =
225+ "Failed to find feature schema node by id: invalid-feature-schema-id"
226+ ):
227+ client .unarchive_feature_schema_node (ontology .uid ,
228+ 'invalid-feature-schema-id' )
229+
230+
231+ def test_unarchive_feature_schema_node_for_non_existing_ontology (
232+ client , ontology ):
233+ feature_schema_to_unarchive = ontology .normalized ['tools' ][0 ]
234+ with pytest .raises (Exception ,
235+ match = "Failed to find ontology by id: invalid-ontology" ):
236+ client .unarchive_feature_schema_node (
237+ 'invalid-ontology' , feature_schema_to_unarchive ['featureSchemaId' ])
0 commit comments