From 0c04b0ba866d56c9d4467b6031875265d251697b Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:12:25 +0200 Subject: [PATCH] Update test --- tests/test_core/test_core_project.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_core/test_core_project.py b/tests/test_core/test_core_project.py index 3e0e7b11..cf76b7f7 100644 --- a/tests/test_core/test_core_project.py +++ b/tests/test_core/test_core_project.py @@ -620,12 +620,12 @@ def testCoreProject_Backup(monkeypatch, mockGUI, fncPath, tstPaths): theFiles = list((tstPaths.tmpDir / "Test Minimal").iterdir()) assert len(theFiles) in (1, 2) # Sometimes 2 due to clock tick - theZip = theFiles[-1].name - assert theZip[:12] == "Backup from " - assert theZip[-4:] == ".zip" + theZip = theFiles[-1] + assert theZip.name.startswith("Test Minimal") + assert theZip.suffix == ".zip" # Extract the archive - with ZipFile(tstPaths.tmpDir / "Test Minimal" / theZip, mode="r") as inZip: + with ZipFile(tstPaths.tmpDir / "Test Minimal" / theZip.name, mode="r") as inZip: inZip.extractall(tstPaths.tmpDir / "extract") # Check that the main project file was restored