From cd085412d1d43f722a5147b89bda70921785ed02 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sat, 31 Jan 2026 22:35:43 +0000 Subject: [PATCH] Mock network call in test_version_command_execution Fixes #3049 by mocking check_for_newer_version to prevent real network calls to PyPI during tests, which was causing timeouts on Windows. Co-authored-by: Bill Easton --- tests/cli/test_cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index a6ab3b8a7..703771dff 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -39,7 +39,8 @@ class TestMainCLI: class TestVersionCommand: """Test the version command.""" - def test_version_command_execution(self): + @patch("fastmcp.cli.cli.check_for_newer_version", return_value=None) + def test_version_command_execution(self, mock_check): """Test that version command executes properly.""" # The version command should execute without raising SystemExit command, bound, _ = app.parse_args(["version"])