Create a ToolManager connected to a real SQLite MCP server. Requires 'sqlite' server defined in server_config.json. Yields the initialized ToolManager, then closes it.
(tmp_path)
| 16 | |
| 17 | @pytest.fixture |
| 18 | async def tool_manager_sqlite(tmp_path): |
| 19 | """Create a ToolManager connected to a real SQLite MCP server. |
| 20 | |
| 21 | Requires 'sqlite' server defined in server_config.json. |
| 22 | Yields the initialized ToolManager, then closes it. |
| 23 | """ |
| 24 | tm = ToolManager( |
| 25 | config_file="server_config.json", |
| 26 | servers=["sqlite"], |
| 27 | initialization_timeout=30.0, |
| 28 | ) |
| 29 | ok = await tm.initialize() |
| 30 | if not ok: |
| 31 | pytest.skip("Could not initialize sqlite server (not available)") |
| 32 | try: |
| 33 | yield tm |
| 34 | finally: |
| 35 | await tm.close() |
nothing calls this directly
no test coverage detected