kiwi-el8/test/unit/bootloader/install/systemd_boot_test.py
Alexandre Detiste fb69627ad3
Use unittest.mock from core python everywhere
mock was an independent module that has been merged into the Python standard library.
2024-02-18 22:15:30 +01:00

26 lines
664 B
Python

from unittest.mock import Mock
from pytest import raises
from kiwi.bootloader.install.systemd_boot import BootLoaderInstallSystemdBoot
class TestBootLoaderInstallSystemdBoot:
def setup(self):
self.bootloader = BootLoaderInstallSystemdBoot(
'root_dir', Mock()
)
def setup_method(self, cls):
self.setup()
def test_install(self):
with raises(NotImplementedError):
self.bootloader.install()
def test_install_required(self):
assert self.bootloader.install_required() is False
def test_secure_boot_install(self):
# just pass
self.bootloader.secure_boot_install()