88def test_model_mesh_components (client , test_id ):
99 route = "/models/vtm_component_indices"
1010
11- data_path = geode_functions .data_file_path ({"id" : test_id }, "viewable.vtm" )
12- os .makedirs (os .path .dirname (data_path ), exist_ok = True )
13- shutil .copy ("./tests/data/cube.vtm" , data_path )
11+ with client .application .app_context ():
12+ data_path = geode_functions .data_file_path ({"id" : test_id }, "viewable.vtm" )
13+ os .makedirs (os .path .dirname (data_path ), exist_ok = True )
14+ shutil .copy ("./tests/data/cube.vtm" , data_path )
1415
1516 response = client .post (route , json = {"id" : test_id })
1617 assert response .status_code == 200
@@ -30,9 +31,10 @@ def test_extract_brep_uuids(client, test_id):
3031 brep_filename = "cube.og_brep"
3132 json_data = {"id" : test_id , "geode_object" : "BRep" , "filename" : brep_filename }
3233
33- data_path = geode_functions .data_file_path (json_data , brep_filename )
34- os .makedirs (os .path .dirname (data_path ), exist_ok = True )
35- shutil .copy (f"./tests/data/{ brep_filename } " , data_path )
34+ with client .application .app_context ():
35+ data_path = geode_functions .data_file_path (json_data , brep_filename )
36+ os .makedirs (os .path .dirname (data_path ), exist_ok = True )
37+ shutil .copy (f"./tests/data/{ brep_filename } " , data_path )
3638
3739 response = client .post (route , json = json_data )
3840 assert response .status_code == 200
0 commit comments