[displaymanager] Adjust tests to match real runtime
- the default_desktop_environment isn't a string, but an object; it is unusual for it to be used in set_autologin
This commit is contained in:
parent
f3e85efd41
commit
16a029abd2
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user