mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
![]() # Context: USER: E AttributeError: <class 'aider.coder.Coder'> does not have the attribute 'check_for_model_availability' ASSISTANT: It seems like you are trying to access the `check_for_model_availability` method of the `Coder` class, but it is not defined as an instance method. To fix this issue, you need to move the `check_model_availability` method inside the `Coder` class and update the tests accordingly. Here are the changes you need to make: 1. Move the ` ^C KeyboardInterrupt USER: fix the `setUp` ASSISTANT: To fix the `setUp` method in the `TestMain` class, you need to update the way you are mocking the `check_for_model_availability` method. Here are the changes you need to make: 1. Modify the `setUp` method in the `TestMain` class to correctly mock the `check_for_model_availability` method of the `Coder` class. ```python tests/test_main.py <<<<<<< ORIGINAL with patch("aider.coder.Coder.check_for_model_availability") as mock_check: mock_check.return_value = True self.mock_check = mock_check ======= with patch("aider.coder.Coder.check_model_availability") as mock_check: mock_check.return_value = True self.mock_check = mock_check >>>>>>> UPDATED ``` This change will ensure that the `check_for_model_availability` method is correctly mocked during the tests. |
||
---|---|---|
.. | ||
__init__.py | ||
test_coder.py | ||
test_commands.py | ||
test_io.py | ||
test_main.py | ||
test_repomap.py | ||
test_utils.py |