From 868af2d5f3f4afcd818cb26ecb38799d46de36ad Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 2 Feb 2025 17:27:08 +0100 Subject: [PATCH] Fix tests --- tests/conftest.py | 2 +- tests/test_gui/test_gui_mainmenu.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 8209f8b6..26298d86 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -57,7 +57,7 @@ def resetConfigVars(): CONFIG.backupOnClose = False CONFIG._homePath = _TMP_ROOT CONFIG._dLocale = QLocale("en_GB") - CONFIG.pdfDocs = _TMP_ROOT / "manual.pdf" + CONFIG._manuals = {"manual": _TMP_ROOT / "manual.pdf"} CONFIG.guiLocale = "en_GB" return diff --git a/tests/test_gui/test_gui_mainmenu.py b/tests/test_gui/test_gui_mainmenu.py index 66b1d94e..c90aa664 100644 --- a/tests/test_gui/test_gui_mainmenu.py +++ b/tests/test_gui/test_gui_mainmenu.py @@ -45,8 +45,8 @@ def testGuiMainMenu_Slots(qtbot, monkeypatch, nwGUI, projPath): with monkeypatch.context() as mp: openUrl = MagicMock() mp.setattr(QDesktopServices, "openUrl", openUrl) - CONFIG.pdfDocs = projPath / "manual.pdf" - CONFIG.pdfDocs.touch() + CONFIG._manuals = {"manual": projPath / "manual.pdf"} + CONFIG._manuals["manual"].touch() nwGUI.mainMenu._openUserManualFile() assert openUrl.called is True assert "manual.pdf" in openUrl.call_args[0][0].url()