diff --git a/tests/test_config.py b/tests/test_config.py index 459079c..26fdd1d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -157,9 +157,13 @@ class TestProject: c = KiwiConfig(projects=None) assert c == KiwiConfig(projects=[]) - assert c.projects == [] + with pytest.raises(ValueError) as exc_info: + c.get_project_config("invalid") + + assert str(exc_info.value) == "No Such Project" + def test_long(self): kiwi_dict = { "name": "project", @@ -171,6 +175,7 @@ class TestProject: assert len(c.projects) == 1 p = c.projects[0] assert p.name == "project" + assert p == c.get_project_config("project") assert not p.enabled assert p.override_storage is not None diff --git a/tests/test_instance.py b/tests/test_instance.py index 68f4280..68799a5 100644 --- a/tests/test_instance.py +++ b/tests/test_instance.py @@ -14,6 +14,10 @@ class TestDefault: assert p.name == "hello-world.project" + s = list(i.get_services(p.name)) + + assert len(s) == 5 + def test_empty(self): i = Instance()