Skip to content

Commit a655775

Browse files
test(cli): update remaining MCP tests for cli_mcp module
1 parent eeb2d6d commit a655775

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/integration/test_mcp_kiro_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TestKiroIntegration(unittest.TestCase):
2121
"""Test suite for end-to-end Kiro integration."""
2222

2323
@integration_test(scope="component")
24-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
24+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
2525
def test_kiro_end_to_end_configuration(self, mock_manager_class):
2626
"""Test complete Kiro configuration workflow."""
2727
# Setup mocks
@@ -107,7 +107,7 @@ def test_kiro_model_to_strategy_workflow(self):
107107
self.assertIn("codebase-retrieval", kiro_model.autoApprove)
108108

109109
@integration_test(scope="end_to_end")
110-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
110+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
111111
def test_kiro_complete_lifecycle(self, mock_manager_class):
112112
"""Test complete Kiro server lifecycle: create, configure, validate."""
113113
# Setup mocks

tests/regression/test_mcp_kiro_cli_integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestKiroCLIIntegration(unittest.TestCase):
1616
"""Test suite for Kiro CLI argument integration."""
1717

18-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
18+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
1919
@regression_test
2020
def test_kiro_cli_with_disabled_flag(self, mock_manager_class):
2121
"""Test CLI with --disabled flag for Kiro."""
@@ -46,7 +46,7 @@ def test_kiro_cli_with_disabled_flag(self, mock_manager_class):
4646
# Verify Kiro-specific field was set
4747
self.assertTrue(server_config.disabled)
4848

49-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
49+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
5050
@regression_test
5151
def test_kiro_cli_with_auto_approve_tools(self, mock_manager_class):
5252
"""Test CLI with --auto-approve-tools for Kiro."""
@@ -74,7 +74,7 @@ def test_kiro_cli_with_auto_approve_tools(self, mock_manager_class):
7474
self.assertEqual(len(server_config.autoApprove), 2)
7575
self.assertIn('codebase-retrieval', server_config.autoApprove)
7676

77-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
77+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
7878
@regression_test
7979
def test_kiro_cli_with_disable_tools(self, mock_manager_class):
8080
"""Test CLI with --disable-tools for Kiro."""
@@ -102,7 +102,7 @@ def test_kiro_cli_with_disable_tools(self, mock_manager_class):
102102
self.assertEqual(len(server_config.disabledTools), 2)
103103
self.assertIn('dangerous-tool', server_config.disabledTools)
104104

105-
@patch('hatch.cli_hatch.MCPHostConfigurationManager')
105+
@patch('hatch.cli.cli_mcp.MCPHostConfigurationManager')
106106
@regression_test
107107
def test_kiro_cli_combined_arguments(self, mock_manager_class):
108108
"""Test CLI with multiple Kiro-specific arguments combined."""

tests/test_mcp_environment_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def test_remove_server_updates_environment(self):
458458
mock_result.backup_path = None
459459
mock_remove.return_value = mock_result
460460

461-
with patch('hatch.cli_hatch.request_confirmation', return_value=True):
461+
with patch('hatch.cli.cli_utils.request_confirmation', return_value=True):
462462
with patch('builtins.print'):
463463
# Action: hatch mcp remove server <server> --host <host>
464464
result = handle_mcp_remove_server(
@@ -497,7 +497,7 @@ def test_remove_host_updates_all_environments(self):
497497

498498
self.mock_env_manager.clear_host_from_all_packages_all_envs.return_value = 3
499499

500-
with patch('hatch.cli_hatch.request_confirmation', return_value=True):
500+
with patch('hatch.cli.cli_utils.request_confirmation', return_value=True):
501501
with patch('builtins.print') as mock_print:
502502
# Action: hatch mcp remove host <host>
503503
result = handle_mcp_remove_host(

0 commit comments

Comments
 (0)