refactor: Move reasoning_content to choices[0].message in MockCompletion

This commit is contained in:
Paul Gauthier (aider) 2025-03-07 16:55:09 -08:00
parent 8545672839
commit 0cd8e3701d

View file

@ -25,10 +25,10 @@ class TestReasoning(unittest.TestCase):
class MockCompletion: class MockCompletion:
def __init__(self, content, reasoning_content): def __init__(self, content, reasoning_content):
self.content = content self.content = content
self.reasoning_content = reasoning_content
# Add required attributes expected by show_send_output # Add required attributes expected by show_send_output
self.choices = [MagicMock()] self.choices = [MagicMock()]
self.choices[0].message.content = content self.choices[0].message.content = content
self.choices[0].message.reasoning_content = reasoning_content
self.finish_reason = "stop" self.finish_reason = "stop"
mock_completion = MockCompletion(main_content, reasoning_content) mock_completion = MockCompletion(main_content, reasoning_content)