Skip to content

Add integration tests for CapiscioMCPServer.connect() factory #34

@beonde

Description

@beonde

Problem

CapiscioMCPServer.connect() is a new public entrypoint (added in PR #32) but lacks integration test coverage. Specifically, no tests verify that it:

  • Correctly loads identity from environment variables
  • Forwards kwargs to the underlying constructor
  • Behaves predictably when called under an existing event loop
  • Handles missing/invalid env vars gracefully

Unit tests cover the individual components, but the composed factory path is untested.

Proposed fix

Add integration tests in tests/test_integrations.py covering:

  1. Happy path: env vars set → server created with correct identity
  2. Missing env vars → clear error message
  3. Kwargs forwarding (e.g., custom mode, name)

Context

Identified during PR #32 code review (Copilot review comment on mcp.py:418).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions