Skip to content

Commit f991122

Browse files
author
Your Name
committed
Fix architect coder tests
1 parent dc2fb3a commit f991122

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

tests/basic/test_coder.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ async def test_get_user_language(self):
13871387
async def test_architect_coder_auto_accept_true(self):
13881388
with GitTemporaryDirectory():
13891389
io = InputOutput(yes=True)
1390-
io.confirm_ask = AsyncMock(return_value=False)
1390+
io.confirm_ask = AsyncMock(return_value=True)
13911391

13921392
coder = await Coder.create(self.GPT35, edit_format="architect", io=io)
13931393
coder.auto_accept_architect = True
@@ -1405,8 +1405,9 @@ async def test_architect_coder_auto_accept_true(self):
14051405
):
14061406
with pytest.raises(SwitchCoderSignal):
14071407
await coder.reply_completed()
1408-
1409-
io.confirm_ask.assert_called_once_with("Edit the files?", allow_tweak=False)
1408+
io.confirm_ask.assert_called_once_with(
1409+
"Edit the files?", allow_tweak=False, explicit_yes_required=False
1410+
)
14101411
mock_editor.generate.assert_called_once()
14111412

14121413
async def test_architect_coder_auto_accept_false_confirmed(self):
@@ -1431,7 +1432,9 @@ async def test_architect_coder_auto_accept_false_confirmed(self):
14311432
with pytest.raises(SwitchCoderSignal):
14321433
await coder.reply_completed()
14331434

1434-
io.confirm_ask.assert_called_once_with("Edit the files?", allow_tweak=False)
1435+
io.confirm_ask.assert_called_once_with(
1436+
"Edit the files?", allow_tweak=False, explicit_yes_required=True
1437+
)
14351438
mock_editor.generate.assert_called_once()
14361439

14371440
async def test_architect_coder_auto_accept_false_rejected(self):
@@ -1451,7 +1454,9 @@ async def test_architect_coder_auto_accept_false_rejected(self):
14511454
result = await coder.reply_completed()
14521455

14531456
assert result is None
1454-
io.confirm_ask.assert_called_once_with("Edit the files?", allow_tweak=False)
1457+
io.confirm_ask.assert_called_once_with(
1458+
"Edit the files?", allow_tweak=False, explicit_yes_required=True
1459+
)
14551460
mock_create.assert_not_called()
14561461

14571462
async def test_process_tool_calls_none_response(self):

0 commit comments

Comments
 (0)