MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / test_org_switch_command

Function test_org_switch_command

lib/cli/tests/organization/test_main.py:46–54  ·  view source on GitHub ↗
(mock_org_command_class, runner)

Source from the content-addressed store, hash-verified

44
45@patch("crewai_cli.cli.OrganizationCommand")
46def test_org_switch_command(mock_org_command_class, runner):
47 mock_org_instance = MagicMock()
48 mock_org_command_class.return_value = mock_org_instance
49
50 result = runner.invoke(switch, ["test-id"])
51
52 assert result.exit_code == 0
53 mock_org_command_class.assert_called_once()
54 mock_org_instance.switch.assert_called_once_with("test-id")
55
56
57@patch("crewai_cli.cli.OrganizationCommand")

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected