@@ -21,7 +21,7 @@ def get_full_data():
2121 "filename" : "corbi.og_brep" ,
2222 "supported_feature" : None ,
2323 }
24-
24+
2525 # Normal test with filename 'corbi.og_brep'
2626 response = client .post (route , json = get_full_data ())
2727 assert response .status_code == 200
@@ -103,13 +103,29 @@ def test_geographic_coordinate_systems(client):
103103def test_inspect_file (client ):
104104 route = f"/inspect_file"
105105
106+ def get_full_data ():
107+ return {
108+ "input_geode_object" : "BRep" ,
109+ "filename" : "corbi.og_brep" ,
110+ }
111+
112+ json = get_full_data ()
113+
106114 # Normal test with geode_object 'BRep'
107115 response = client .post (
108- route , json = { "input_geode_object" : "BRep" , "filename" : "corbi.og_brep" }
116+ route , json = json
109117 )
110118 assert response .status_code == 200
111119 inspection_result = response .json ["inspection_result" ]
112- assert type (inspection_result ) is list
120+ assert type (inspection_result ) is dict
121+
122+ for key , value in get_full_data ().items ():
123+ json = get_full_data ()
124+ json .pop (key )
125+ response = client .post (route , json = json )
126+ assert response .status_code == 400
127+ error_description = response .json ["description" ]
128+ assert error_description == f"Validation error: '{ key } ' is a required property"
113129
114130
115131def test_geode_objects_and_output_extensions (client ):
0 commit comments