mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44:17 +02:00
Update test_mount.py
This commit is contained in:
parent
012fccb1ff
commit
e7672bf0bc
1 changed files with 13 additions and 0 deletions
|
|
@ -304,6 +304,19 @@ class TestDynamicChanges:
|
|||
tools = await main_app.get_tools()
|
||||
assert "sub_temp_tool" not in tools
|
||||
|
||||
async def test_cache_expiration(self):
|
||||
main_app = FastMCP("MainApp", cache_expiration_seconds=2)
|
||||
sub_app = FastMCP("SubApp")
|
||||
tools = await main_app.get_tools()
|
||||
assert len(tools) == 0
|
||||
|
||||
@sub_app.tool
|
||||
def sub_tool():
|
||||
return "sub_tool"
|
||||
|
||||
tools = await main_app.get_tools()
|
||||
assert len(tools) == 0
|
||||
|
||||
|
||||
class TestResourcesAndTemplates:
|
||||
"""Test mounting with resources and resource templates."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue