def test_configure_states(self) -> None: parser = configparser.ConfigParser() parser.read_string( """ [section] states=test, bla,foo """ ) check = LogindSessionsIdle.create("name", parser["section"]) assert check._states == ["test", "bla", "foo"]
def test_configure_types(self): parser = configparser.ConfigParser() parser.read_string('''[section] types=test, bla,foo''') check = LogindSessionsIdle.create('name', parser['section']) assert check._types == ['test', 'bla', 'foo']
def test_configure_defaults(self) -> None: parser = configparser.ConfigParser() parser.read_string("[section]") check = LogindSessionsIdle.create("name", parser["section"]) assert check._types == ["tty", "x11", "wayland"] assert check._states == ["active", "online"]
def test_configure_defaults(self): parser = configparser.ConfigParser() parser.read_string('[section]') check = LogindSessionsIdle.create('name', parser['section']) assert check._types == ['tty', 'x11', 'wayland'] assert check._states == ['active', 'online']