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

Function temp_config_file

tests/tools/test_config_loader.py:13–34  ·  view source on GitHub ↗

Create a temporary config file.

(tmp_path)

Source from the content-addressed store, hash-verified

11
12@pytest.fixture
13def 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected