Skip to content

[BugFix] openbb-mcp-server: Fix Test Fixtures for Compatibility With FastMCP >=3.2.0#7448

Merged
piiq merged 5 commits intodevelopfrom
bugfix/mcp-prompts-mocks
Apr 2, 2026
Merged

[BugFix] openbb-mcp-server: Fix Test Fixtures for Compatibility With FastMCP >=3.2.0#7448
piiq merged 5 commits intodevelopfrom
bugfix/mcp-prompts-mocks

Conversation

@deeleeramone
Copy link
Copy Markdown
Contributor

@deeleeramone deeleeramone commented Mar 31, 2026

This PR addresses the failing tests stemming from mcp_server. The issue is that fastmcp>=3.2.0 added a type check in PromptsAsTools that is not compatible with MagicMock. The solution was to patch the module as a fixture instead of passing MagicMock as the server instance.

There are no changes to the code, only test files.

This will also resolve GHSA-vv7q-7jx5-f767 by pinning the lower bound version to 3.2.0

@deeleeramone deeleeramone added bug Bugs and bug fixes tests Test-related work dependencies Work related to dependencies platform OpenBB Platform extensions Extension-related v4 PRs for v4 labels Mar 31, 2026
@deeleeramone deeleeramone requested a review from piiq April 2, 2026 04:46
@piiq piiq added this pull request to the merge queue Apr 2, 2026
Merged via the queue into develop with commit b6e05ba Apr 2, 2026
16 checks passed
@piiq piiq deleted the bugfix/mcp-prompts-mocks branch April 2, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs and bug fixes dependencies Work related to dependencies extensions Extension-related platform OpenBB Platform tests Test-related work v4 PRs for v4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants