File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -321,3 +321,15 @@ def test_create_point(client):
321321
322322 # Test all params
323323 test_utils .test_route_wrong_params (client , route , get_full_data )
324+
325+
326+ def test_database_uri_path (client ):
327+ app = client .application
328+ with app .app_context ():
329+ base_dir = os .path .abspath (os .path .dirname (__file__ ))
330+ expected_db_path = os .path .join (base_dir , "data" , "project.db" )
331+ expected_uri = f"sqlite:///{ expected_db_path } "
332+
333+ assert app .config ["SQLALCHEMY_DATABASE_URI" ] == expected_uri
334+
335+ assert os .path .exists (expected_db_path )
Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ def test_create_unique_data_folder(client):
9090def test_save_all_viewables_and_return_info (client ):
9191 app = client .application
9292 with app .app_context ():
93+ base_dir = os .path .abspath (os .path .dirname (__file__ ))
94+ expected_db_path = os .path .join (base_dir , "data" , "project.db" )
95+ expected_uri = f"sqlite:///{ expected_db_path } "
96+
97+ assert app .config ["SQLALCHEMY_DATABASE_URI" ] == expected_uri
98+ assert os .path .exists (expected_db_path )
99+
93100 geode_object = "BRep"
94101 data = geode_functions .load (geode_object , "./tests/data/test.og_brep" )
95102 generated_id , data_path = utils_functions .create_unique_data_folder ()
You can’t perform that action at this time.
0 commit comments