diff --git a/src/modules/displaymanager/tests/test-dm-greetd.py b/src/modules/displaymanager/tests/test-dm-greetd.py index 8988aaa52..6be0e3d47 100644 --- a/src/modules/displaymanager/tests/test-dm-greetd.py +++ b/src/modules/displaymanager/tests/test-dm-greetd.py @@ -2,17 +2,21 @@ import libcalamares libcalamares.globalstorage = libcalamares.GlobalStorage(None) libcalamares.globalstorage.insert("testing", True) + # Module prep-work +from src.modules.displaymanager import main +default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop") + import os os.makedirs("/tmp/etc/greetd/", exist_ok=True) try: os.remove("/tmp/etc/greetd/config.toml") except FileNotFoundError as e: pass -# Module test -from src.modules.displaymanager import main + +# Specific DM test d = main.DMgreetd("/tmp") -d.set_autologin("d", True, "kde") +d.set_autologin("d", True, default_desktop_environment) # .. and again (this time checks load/save) -d.set_autologin("d", True, "kde") -d.set_autologin("d", True, "kde") +d.set_autologin("d", True, default_desktop_environment) +d.set_autologin("d", True, default_desktop_environment) diff --git a/src/modules/displaymanager/tests/test-dm-sddm.py b/src/modules/displaymanager/tests/test-dm-sddm.py index eb65d95f4..5e4b54b30 100644 --- a/src/modules/displaymanager/tests/test-dm-sddm.py +++ b/src/modules/displaymanager/tests/test-dm-sddm.py @@ -2,11 +2,14 @@ import libcalamares libcalamares.globalstorage = libcalamares.GlobalStorage(None) libcalamares.globalstorage.insert("testing", True) + # Module prep-work -# Module test from src.modules.displaymanager import main +default_desktop_environment = main.DesktopEnvironment("startplasma-x11", "kde-plasma.desktop") + +# Specific DM test d = main.DMsddm("/tmp") -d.set_autologin("d", True, "kde") +d.set_autologin("d", True, default_desktop_environment) # .. and again (this time checks load/save) -d.set_autologin("d", True, "kde") -d.set_autologin("d", True, "kde") +d.set_autologin("d", True, default_desktop_environment) +d.set_autologin("d", True, default_desktop_environment)