Test load_sync with valid file.
(self, tmp_path)
| 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.""" |