From e7672bf0bc9f79f724ece9985a8f15502b15f3d0 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Sat, 7 Jun 2025 17:37:48 -0400 Subject: [PATCH] Update test_mount.py --- tests/server/test_mount.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/server/test_mount.py b/tests/server/test_mount.py index 090666ccc..97c2efd3e 100644 --- a/tests/server/test_mount.py +++ b/tests/server/test_mount.py @@ -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."""