Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
a429b49
1
Parent(s): 97d16c5
Update testing.mdx
Browse files- docs/patterns/testing.mdx +10 -0
docs/patterns/testing.mdx
CHANGED
|
@@ -36,3 +36,13 @@ async def test_tool_functionality(mcp_server):
|
|
| 36 |
```
|
| 37 |
|
| 38 |
This pattern creates a direct connection between the client and server, allowing you to test your server's functionality efficiently.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
```
|
| 37 |
|
| 38 |
This pattern creates a direct connection between the client and server, allowing you to test your server's functionality efficiently.
|
| 39 |
+
|
| 40 |
+
<Tip>
|
| 41 |
+
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.
|
| 42 |
+
</Tip>
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## Mocking
|
| 46 |
+
|
| 47 |
+
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.
|
| 48 |
+
|