From f3a7c6335460890d457cadefe12e3182f0ddda63 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Mon, 6 Jan 2025 15:44:09 -0600 Subject: [PATCH] update tests with new property --- src/ansys/mechanical/core/embedding/ui.py | 2 +- tests/embedding/test_app.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansys/mechanical/core/embedding/ui.py b/src/ansys/mechanical/core/embedding/ui.py index af631b460..77418039a 100644 --- a/src/ansys/mechanical/core/embedding/ui.py +++ b/src/ansys/mechanical/core/embedding/ui.py @@ -59,7 +59,7 @@ def save_temp_copy( A Mechanical embedding application. """ # Identify the mechdb of the saved session from save_original() - project_directory = Path(app.DataModel.Project.ProjectDirectory) + project_directory = Path(app.project_directory) project_directory_parent = project_directory.parent mechdb_file = ( project_directory_parent / f"{project_directory.parts[-1].split('_')[0]}.mechdb" diff --git a/tests/embedding/test_app.py b/tests/embedding/test_app.py index c2ed55970..4d4f01a90 100644 --- a/tests/embedding/test_app.py +++ b/tests/embedding/test_app.py @@ -297,7 +297,7 @@ def test_rm_lockfile(embedded_app, tmp_path: pytest.TempPathFactory): embedded_app.save(mechdat_path) embedded_app.close() - lockfile_path = os.path.join(embedded_app.DataModel.Project.ProjectDirectory, ".mech_lock") + lockfile_path = os.path.join(embedded_app.project_directory, ".mech_lock") # Assert lock file path does not exist assert not os.path.exists(lockfile_path) @@ -450,7 +450,7 @@ def test_app_lock_file_open(embedded_app, tmp_path: pytest.TempPathFactory): embedded_app.save_as(project_file) embedded_app.save_as(project_file, overwrite=True) - lock_file = Path(embedded_app.DataModel.Project.ProjectDirectory) / ".mech_lock" + lock_file = Path(embedded_app.project_directory) / ".mech_lock" # Assert the lock file exists after saving it assert lock_file.exists()