Create a temporary config file.
(tmp_path)
| 11 | |
| 12 | @pytest.fixture |
| 13 | def temp_config_file(tmp_path): |
| 14 | """Create a temporary config file.""" |
| 15 | config = { |
| 16 | "mcpServers": { |
| 17 | "http_server": { |
| 18 | "url": "https://example.com/mcp", |
| 19 | "headers": {"Authorization": "Bearer token"}, |
| 20 | }, |
| 21 | "sse_server": { |
| 22 | "url": "https://example.com/sse", |
| 23 | "transport": "sse", |
| 24 | }, |
| 25 | "stdio_server": { |
| 26 | "command": "python", |
| 27 | "args": ["-m", "server"], |
| 28 | "env": {"DEBUG": "1"}, |
| 29 | }, |
| 30 | } |
| 31 | } |
| 32 | config_path = tmp_path / "mcp_config.json" |
| 33 | config_path.write_text(json.dumps(config)) |
| 34 | return str(config_path) |
| 35 | |
| 36 | |
| 37 | @pytest.fixture |
nothing calls this directly
no outgoing calls
no test coverage detected