File: systemd_boot_test.py

package info (click to toggle)
kiwi 10.2.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 7,664 kB
  • sloc: python: 69,179; sh: 4,228; xml: 3,383; ansic: 391; makefile: 353
file content (25 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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(
            Mock(), '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()