MCPcopy Create free account
hub / github.com/IBM/mcp-cli / manager

Method manager

tests/model_management/test_model_manager.py:605–615  ·  view source on GitHub ↗

Create a ModelManager with mocked initialization.

(self)

Source from the content-addressed store, hash-verified

603
604 @pytest.fixture
605 def manager(self) -> ModelManager:
606 """Create a ModelManager with mocked initialization."""
607 with patch.object(ModelManager, "_initialize_chuk_llm"):
608 with patch.object(ModelManager, "_load_custom_providers"):
609 mgr = ModelManager()
610 mgr._chuk_config = None
611 mgr._active_provider = "ollama"
612 mgr._active_model = "llama2"
613 mgr._custom_providers = {}
614 mgr._client_factory = MagicMock()
615 return mgr
616
617 def test_get_client_uses_active(self, manager: ModelManager) -> None:
618 """Test get_client uses active provider/model when not specified."""

Callers

nothing calls this directly

Calls 1

ModelManagerClass · 0.90

Tested by

no test coverage detected