π The fast, Pythonic way to build MCP servers and clients.
Fix typing inference issue
Jeremiah Lowin9f8127bdfc9c
diff --git a/tests/prompts/test_prompt_manager.py b/tests/prompts/test_prompt_manager.pyindex 51710792c..c33751061 100644--- a/tests/prompts/test_prompt_manager.py+++ b/tests/prompts/test_prompt_manager.py@@ -5,7 +5,7 @@ import pytestfrom fastmcp import Contextfrom fastmcp.exceptions import NotFoundError, PromptErrorfrom fastmcp.prompts import Prompt-from fastmcp.prompts.prompt import PromptMessage, TextContent+from fastmcp.prompts.prompt import FunctionPrompt, PromptMessage, TextContentfrom fastmcp.prompts.prompt_manager import PromptManager@@ -97,6 +97,7 @@ class TestPromptManager:# Should have replaced with the new promptprompt = manager.get_prompt("test_prompt")assert prompt is not None+ assert isinstance(prompt, FunctionPrompt)assert prompt.fn.__name__ == "replacement_fn"def test_ignore_duplicate_prompts(self):@@ -118,8 +119,10 @@ class TestPromptManager:# Should keep the originalprompt = manager.get_prompt("test_prompt")assert prompt is not None+ assert isinstance(prompt, FunctionPrompt)assert prompt.fn.__name__ == "original_fn"# Result should be the original prompt+ assert isinstance(result, FunctionPrompt)assert result.fn.__name__ == "original_fn"def test_get_prompts(self):