fix: Add mdstream mock to resolve WholeFileCoder test failure

This commit is contained in:
Paul Gauthier (aider) 2025-03-07 17:04:03 -08:00
parent c53833072f
commit f8c069132e

View file

@ -121,6 +121,9 @@ class TestReasoning(unittest.TestCase):
# Mock the model's send_completion to return the hash and completion # Mock the model's send_completion to return the hash and completion
with patch.object(model, "send_completion", return_value=(mock_hash, chunks)): with patch.object(model, "send_completion", return_value=(mock_hash, chunks)):
# Set mdstream directly on the coder object
coder.mdstream = mock_mdstream
# Call send with a simple message # Call send with a simple message
messages = [{"role": "user", "content": "test prompt"}] messages = [{"role": "user", "content": "test prompt"}]
list(coder.send(messages)) list(coder.send(messages))