Beispiel #1
0
    def test_empty(self):
        c = KiwiConfig(projects=None)

        assert c == KiwiConfig(projects=[])
        assert c.projects == []

        assert c.get_project_config("invalid") is None
Beispiel #2
0
    def test_long(self):
        kiwi_dict = {
            "name": "project",
            "enabled": False,
            "override_storage": {
                "directory": "/test/directory"
            },
        }
        c = KiwiConfig(projects=[kiwi_dict])

        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

        assert c.kiwi_dict["projects"][0] == kiwi_dict