Issue Type
Other: factory / test-infrastructure improvement
Description
The MCP test setup already has reusable client code, but the request setup is still fairly manual. A small factory would make test setup cleaner and easier to extend. This is a good fit for v0.0.1 because it improves infrastructure now and helps later work in v0.0.2.
Steps to Reproduce (for bugs)
- Open
tests/mcp/conftest.py
- Review how the MCP test client and request defaults are set up
- Note that common setup values are still handled fairly manually
- Observe that a small factory would make reuse and extension easier
Expected behaviour
Test infrastructure should have one small factory/helper for creating MCP test clients with shared defaults.
Actual behaviour
The current setup works, but common test-client setup details are more manual than they need to be.
Screenshots
Not applicable.
Additional context
Proposed scope:
- Add a small factory/helper for creating MCP test clients
- Include the common request defaults in one place
- Keep it focused on test infrastructure only
- Do not change production code behavior
Out of scope:
- A full dependency injection system
- Refactoring the whole test suite at once
- Changing MCP protocol behavior
- Production client factories
Acceptance criteria:
- A small MCP test client factory exists in test infrastructure
- Common setup values are defined in one place
- Tests can use the factory instead of repeating setup details
- Production behavior stays unchanged
Possible Solution
Add one small helper like build_mcp_test_client() that creates the client with default headers, protocol version, and initialization values. Start by using it in one or two tests first.
Your Environment (for bugs):
- Operating System: N/A
- Browser (if applicable): N/A
- Version of the software: current
main branch
Issue Type
Other: factory / test-infrastructure improvement
Description
The MCP test setup already has reusable client code, but the request setup is still fairly manual. A small factory would make test setup cleaner and easier to extend. This is a good fit for v0.0.1 because it improves infrastructure now and helps later work in v0.0.2.
Steps to Reproduce (for bugs)
tests/mcp/conftest.pyExpected behaviour
Test infrastructure should have one small factory/helper for creating MCP test clients with shared defaults.
Actual behaviour
The current setup works, but common test-client setup details are more manual than they need to be.
Screenshots
Not applicable.
Additional context
Proposed scope:
Out of scope:
Acceptance criteria:
Possible Solution
Add one small helper like
build_mcp_test_client()that creates the client with default headers, protocol version, and initialization values. Start by using it in one or two tests first.Your Environment (for bugs):
mainbranch