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

Method test_load_sync_valid_file

tests/config/test_config_models.py:208–221  ·  view source on GitHub ↗

Test load_sync with valid file.

(self, tmp_path)

Source from the content-addressed store, hash-verified

206 assert config.default_provider is not None
207
208 def test_load_sync_valid_file(self, tmp_path):
209 """Test load_sync with valid file."""
210 config_data = {
211 "defaultProvider": "openai",
212 "defaultModel": "gpt-4-turbo",
213 "theme": "light",
214 }
215 config_file = tmp_path / "config.json"
216 config_file.write_text(json.dumps(config_data))
217
218 config = MCPConfig.load_sync(config_file)
219 # Note: MCPConfig uses snake_case internally but JSON uses camelCase
220 # The load might not map camelCase to snake_case automatically
221 assert config is not None
222
223 def test_load_from_file_alias(self, tmp_path):
224 """Test load_from_file alias for backward compatibility."""

Callers

nothing calls this directly

Calls 1

load_syncMethod · 0.80

Tested by

no test coverage detected