File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/opengeodeweb_back/routes Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -247,11 +247,11 @@ def geode_objects_and_output_extensions():
247247)
248248def save_viewable_file ():
249249 utils_functions .validate_request (flask .request , save_viewable_file_json )
250- file_path = geode_functions .upload_file_path (flask .request .json ["filename" ])
251250 return flask .make_response (
252251 utils_functions .generate_native_viewable_and_light_viewable_from_file (
253252 flask .request .json ["input_geode_object" ],
254- input_filename = file_path ,
253+ flask .request .json ["data_id" ], # Nouveau paramètre
254+ flask .request .json ["filename" ],
255255 ),
256256 200 ,
257257 )
Original file line number Diff line number Diff line change @@ -100,10 +100,14 @@ def test_generate_native_viewable_and_light_viewable_from_file(client):
100100 app = client .application
101101 with app .app_context ():
102102 geode_object = "BRep"
103- input_filename = "./tests/data/test.og_brep"
103+ data_id = "test_id"
104+ input_filename = "test.og_brep"
105+ data_path = geode_functions .data_file_path (data_id , input_filename )
106+ os .makedirs (os .path .dirname (data_path ), exist_ok = True )
107+ shutil .copy ("./tests/data/test.og_brep" , data_path )
104108
105109 result = utils_functions .generate_native_viewable_and_light_viewable_from_file (
106- geode_object , input_filename
110+ geode_object , data_id , input_filename
107111 )
108112
109113 assert isinstance (result , dict )
You can’t perform that action at this time.
0 commit comments