(mock_org_command_class, runner)
| 44 | |
| 45 | @patch("crewai_cli.cli.OrganizationCommand") |
| 46 | def 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") |