From 6ad47dda8928b412f27ac8937a80488b3cdf0795 Mon Sep 17 00:00:00 2001 From: jamiepine <32987599+jamiepine@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:30:39 +0000 Subject: [PATCH] test(speak): build the MCP test server from fastmcp, the package production imports --- backend/tests/test_speak_language.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/tests/test_speak_language.py b/backend/tests/test_speak_language.py index 97f9f57f..0997a110 100644 --- a/backend/tests/test_speak_language.py +++ b/backend/tests/test_speak_language.py @@ -121,7 +121,10 @@ async def test_rest_speak_defaults_to_en_without_profile_language(captured_reque async def _call_mcp(monkeypatch, profile_language, requested_language=None): - from mcp.server.fastmcp import FastMCP + # Build the server from the same ``fastmcp`` package production imports so + # the registered ``voicebox.speak`` wrapper — where the profile fallback + # lives — is the code under test. + from fastmcp import FastMCP monkeypatch.setattr( tools,