Test configuration initialization with invalid JSON.
(tmp_path)
| 85 | |
| 86 | @pytest.mark.asyncio |
| 87 | async def test_initialize_config_invalid_json(tmp_path): |
| 88 | """Test configuration initialization with invalid JSON.""" |
| 89 | config_file = tmp_path / "invalid.json" |
| 90 | config_file.write_text("{ invalid json }") |
| 91 | |
| 92 | # Reset the singleton first |
| 93 | ConfigManager._instance = None |
| 94 | |
| 95 | # Initialize with invalid JSON should create empty config |
| 96 | config = initialize_config(config_file) |
| 97 | |
| 98 | # Should have empty servers but not fail |
| 99 | assert config is not None |
| 100 | assert config.servers == {} |
| 101 | |
| 102 | |
| 103 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected