def test_load_component(self, base_server: Server): comp = base_server.load_component(base_server.config, "klippy_apis") assert isinstance(comp, KlippyAPI)
def test_load_component_fail(self, base_server: Server): with pytest.raises(ServerError): base_server.load_component(base_server.config, "invalid_component")
def test_load_component_fail_with_default(self, base_server: Server): comp = base_server.load_component(base_server.config, "invalid_component", None) assert comp is None
def config(base_server: Server) -> ConfigHelper: base_server.load_component(base_server.config, "secrets") return base_server.config