MCPcopy Create free account
hub / github.com/PrefectHQ/fastmcp / test_cursor_command_basic

Method test_cursor_command_basic

tests/cli/test_cursor.py:420–446  ·  view source on GitHub ↗

Test basic cursor command execution.

(self, mock_process_args, mock_install)

Source from the content-addressed store, hash-verified

418 @patch("fastmcp.cli.install.cursor.install_cursor")
419 @patch("fastmcp.cli.install.cursor.process_common_args")
420 async def test_cursor_command_basic(self, mock_process_args, mock_install):
421 """Test basic cursor command execution."""
422 mock_process_args.return_value = (
423 Path("server.py"),
424 None,
425 "test-server",
426 [],
427 {},
428 )
429 mock_install.return_value = True
430
431 with patch("sys.exit") as mock_exit:
432 await cursor_command("server.py")
433
434 mock_install.assert_called_once_with(
435 file=Path("server.py"),
436 server_object=None,
437 name="test-server",
438 with_editable=[],
439 with_packages=[],
440 env_vars={},
441 python_version=None,
442 with_requirements=None,
443 project=None,
444 workspace=None,
445 )
446 mock_exit.assert_not_called()
447
448 @patch("fastmcp.cli.install.cursor.install_cursor")
449 @patch("fastmcp.cli.install.cursor.process_common_args")

Callers

nothing calls this directly

Calls 2

cursor_commandFunction · 0.90
assert_not_calledMethod · 0.45

Tested by

no test coverage detected