From 232edc2b0773ffbe1a0df44c66e6c2e5a65dfc79 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:36:10 -0400 Subject: [PATCH] Update testing.mdx --- docs/patterns/testing.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/patterns/testing.mdx b/docs/patterns/testing.mdx index 82e4ee1c2..fc3a077e8 100644 --- a/docs/patterns/testing.mdx +++ b/docs/patterns/testing.mdx @@ -36,3 +36,13 @@ async def test_tool_functionality(mcp_server): ``` This pattern creates a direct connection between the client and server, allowing you to test your server's functionality efficiently. + + +If you're using pytest for async tests, as shown above, you may need to configure appropriate markers or set `asyncio_mode = "auto"` in your pytest configuration in order to handle async test functions automatically. + + + +## Mocking + +FastMCP servers are designed to work seamlessly with standard Python testing tools and patterns. There's nothing special about testing FastMCP servers - you can use all the familiar Python mocking, patching, and testing techniques you already know. +