mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 20:35:00 +00:00
patch check_model_availability in tests
This commit is contained in:
parent
2cc87a4afe
commit
e43a48ee10
2 changed files with 16 additions and 1 deletions
|
@ -1,11 +1,19 @@
|
|||
import os
|
||||
import unittest
|
||||
from unittest.mock import MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from aider.coder import Coder
|
||||
|
||||
|
||||
class TestCoder(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.patcher = patch("aider.coder.Coder.check_model_availability")
|
||||
self.mock_check = self.patcher.start()
|
||||
self.mock_check.return_value = True
|
||||
|
||||
def tearDown(self):
|
||||
self.patcher.stop()
|
||||
|
||||
def test_check_for_file_mentions(self):
|
||||
# Mock the IO object
|
||||
mock_io = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue