mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
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 <strawgate@users.noreply.github.com>
This commit is contained in:
parent
684cbff634
commit
cd085412d1
1 changed files with 2 additions and 1 deletions
|
|
@ -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"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue