aider/tests
Paul Gauthier fa1158d8a8 aider: Replaced MagicMock with custom mock_send function to set partial_response_content and return False in test_get_commit_message.
# Context:
USER: and test_get_commit_message
ASSISTANT: To make the requested change, modify the `test_get_commit_message` method in the `tests/test_coder.py` file as follows:

```python
tests/test_coder.py
<<<<<<< ORIGINAL
        # Mock the send method to return a tuple with a message and False
        coder.send = MagicMock(return_value=("a good commit message", False))
=======
        # Mock the send method to set partial_response_content and return False
        def mock_send(*args, **kwargs):
            coder.partial_response_content = "a good commit message"
            return False

        coder.send = MagicMock(side_effect=mock_send)
>>>>>>> UPDATED
```

This will replace the original `MagicMock` with a custom `mock_send` function that sets `coder.partial_response_content` to the desired commit message and returns `False`.
2023-06-21 21:39:47 -07:00
..
__init__.py aider: Added empty __init__.py file to tests directory to fix ModuleNotFoundError when running tests. 2023-05-11 17:12:42 -07:00
test_coder.py aider: Replaced MagicMock with custom mock_send function to set partial_response_content and return False in test_get_commit_message. 2023-06-21 21:39:47 -07:00
test_commands.py fixed test 2023-06-21 21:33:51 -07:00
test_editblock.py refac 2023-06-20 17:46:47 -07:00
test_io.py isort 2023-05-28 22:47:38 -07:00
test_main.py refac 2023-06-20 17:46:47 -07:00
test_models.py More Model test cases 2023-06-21 14:13:34 -07:00
test_repomap.py Return files without any tags at all at the tail of the ranked_tags list 2023-06-04 14:53:14 -07:00