11import os
22import shutil
33
4+
45def test_model_mesh_components (client ):
56 test_id = "1"
67 route = "/models/vtm_component_indices"
78
89 base_path = client .application .config ["DATA_FOLDER_PATH" ]
910 data_path = os .path .join (base_path , test_id )
1011 os .makedirs (data_path , exist_ok = True )
11- shutil .copy (
12- "./tests/data/cube.vtm" ,
13- os .path .join (data_path , "viewable.vtm" )
14- )
12+ shutil .copy ("./tests/data/cube.vtm" , os .path .join (data_path , "viewable.vtm" ))
1513
1614 response = client .post (route , json = {"id" : test_id })
1715 assert response .status_code == 200
@@ -20,7 +18,7 @@ def test_model_mesh_components(client):
2018 assert isinstance (uuid_dict , dict )
2119
2220 indices = sorted (uuid_dict .values ())
23- assert all (indices [i ] > indices [i - 1 ] for i in range (1 , len (indices )))
21+ assert all (indices [i ] > indices [i - 1 ] for i in range (1 , len (indices )))
2422 for key in uuid_dict :
2523 assert isinstance (key , str )
2624
@@ -32,16 +30,9 @@ def test_extract_brep_uuids(client):
3230 base_path = client .application .config ["DATA_FOLDER_PATH" ]
3331 data_path = os .path .join (base_path , test_id )
3432 os .makedirs (data_path , exist_ok = True )
35- shutil .copy (
36- "./tests/data/cube.og_brep" ,
37- os .path .join (data_path , "cube.og_brep" )
38- )
39-
40- json_data = {
41- "id" : test_id ,
42- "geode_object" : "BRep" ,
43- "filename" : "cube.og_brep"
44- }
33+ shutil .copy ("./tests/data/cube.og_brep" , os .path .join (data_path , "cube.og_brep" ))
34+
35+ json_data = {"id" : test_id , "geode_object" : "BRep" , "filename" : "cube.og_brep" }
4536 response = client .post (route , json = json_data )
4637 assert response .status_code == 200
4738
@@ -52,4 +43,3 @@ def test_extract_brep_uuids(client):
5243 for values in uuid_dict .values ():
5344 assert isinstance (values , list )
5445 assert all (isinstance (v , str ) for v in values )
55-
0 commit comments