(self)
| 1328 | self.assertIsNone(coder.get_user_language()) |
| 1329 | |
| 1330 | def test_architect_coder_auto_accept_true(self): |
| 1331 | with GitTemporaryDirectory(): |
| 1332 | io = InputOutput(yes=True) |
| 1333 | io.confirm_ask = MagicMock(return_value=True) |
| 1334 | |
| 1335 | # Create an ArchitectCoder with auto_accept_architect=True |
| 1336 | with patch("aider.coders.architect_coder.AskCoder.__init__", return_value=None): |
| 1337 | from aider.coders.architect_coder import ArchitectCoder |
| 1338 | |
| 1339 | coder = ArchitectCoder() |
| 1340 | coder.io = io |
| 1341 | coder.main_model = self.GPT35 |
| 1342 | coder.auto_accept_architect = True |
| 1343 | coder.verbose = False |
| 1344 | coder.total_cost = 0 |
| 1345 | coder.cur_messages = [] |
| 1346 | coder.done_messages = [] |
| 1347 | coder.summarizer = MagicMock() |
| 1348 | coder.summarizer.too_big.return_value = False |
| 1349 | |
| 1350 | # Mock editor_coder creation and execution |
| 1351 | mock_editor = MagicMock() |
| 1352 | with patch("aider.coders.architect_coder.Coder.create", return_value=mock_editor): |
| 1353 | # Set partial response content |
| 1354 | coder.partial_response_content = "Make these changes to the code" |
| 1355 | |
| 1356 | # Call reply_completed |
| 1357 | coder.reply_completed() |
| 1358 | |
| 1359 | # Verify that confirm_ask was not called (auto-accepted) |
| 1360 | io.confirm_ask.assert_not_called() |
| 1361 | |
| 1362 | # Verify that editor coder was created and run |
| 1363 | mock_editor.run.assert_called_once() |
| 1364 | |
| 1365 | def test_architect_coder_auto_accept_false_confirmed(self): |
| 1366 | with GitTemporaryDirectory(): |
nothing calls this directly
no test coverage detected