Skip to content

Commit d0e7ae4

Browse files
committed
update test with new persistance workflow
1 parent 55af6cc commit d0e7ae4

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

tests/test_models_routes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,14 @@ def test_export_project_route(client: FlaskClient, tmp_path: Path) -> None:
6262
geode_object="BRep",
6363
viewer_object="BRep",
6464
viewer_elements_type="default",
65-
input_file="test_native.txt",
6665
native_file="test_native.txt",
67-
additional_files=[],
6866
)
6967
data2 = Data(
7068
id="test_data_2",
7169
geode_object="Section",
7270
viewer_object="Section",
7371
viewer_elements_type="default",
74-
input_file="test_input.txt",
7572
native_file="test_native2.txt",
76-
additional_files=[],
7773
)
7874
session.add(data1)
7975
session.add(data2)
@@ -86,8 +82,8 @@ def test_export_project_route(client: FlaskClient, tmp_path: Path) -> None:
8682

8783
data2_dir = os.path.join(project_folder, "test_data_2")
8884
os.makedirs(data2_dir, exist_ok=True)
89-
with open(os.path.join(data2_dir, "test_input.txt"), "w") as f:
90-
f.write("input file content")
85+
with open(os.path.join(data2_dir, "test_native2.txt"), "w") as f:
86+
f.write("native file content")
9187

9288
response = client.post(route, json={"snapshot": snapshot, "filename": filename})
9389
assert response.status_code == 200
@@ -105,7 +101,7 @@ def test_export_project_route(client: FlaskClient, tmp_path: Path) -> None:
105101
assert parsed == snapshot
106102
assert "project.db" in names
107103
assert "test_data_1/test_native.txt" in names
108-
assert "test_data_2/test_input.txt" in names
104+
assert "test_data_2/test_native2.txt" in names
109105

110106
response.close()
111107

@@ -132,7 +128,7 @@ def test_import_project_route(client: FlaskClient, tmp_path: Path) -> None:
132128
conn = sqlite3.connect(str(temp_db))
133129
conn.execute(
134130
"CREATE TABLE datas (id TEXT PRIMARY KEY, geode_object TEXT, viewer_object TEXT, viewer_elements_type TEXT, native_file TEXT, "
135-
"viewable_file TEXT, light_viewable_file TEXT, input_file TEXT, additional_files TEXT)"
131+
"viewable_file TEXT, light_viewable_file TEXT)"
136132
)
137133
conn.commit()
138134
conn.close()

0 commit comments

Comments
 (0)