MCPcopy Create free account
hub / github.com/GH05TCREW/MetasploitMCP / pytest_configure

Function pytest_configure

conftest.py:14–30  ·  view source on GitHub ↗

Configure pytest with custom settings.

(config)

Source from the content-addressed store, hash-verified

12sys.path.insert(0, os.path.dirname(__file__))
13
14def pytest_configure(config):
15 """Configure pytest with custom settings."""
16 # Mock external dependencies that might not be available
17 mock_modules = [
18 'uvicorn',
19 'fastapi',
20 'mcp.server.fastmcp',
21 'mcp.server.sse',
22 'pymetasploit3.msfrpc',
23 'starlette.applications',
24 'starlette.routing',
25 'mcp.server.session'
26 ]
27
28 for module in mock_modules:
29 if module not in sys.modules:
30 sys.modules[module] = Mock()
31
32def pytest_collection_modifyitems(config, items):
33 """Modify test collection to add markers automatically."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected