mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
fix: Resolve MagicMock TypeError in test_no_verify_ssl_sets_model_info_manager
This commit is contained in:
parent
5cf6945bcb
commit
8e2246ec5c
1 changed files with 4 additions and 0 deletions
|
@ -691,11 +691,15 @@ class TestMain(TestCase):
|
|||
with patch("aider.models.Model") as mock_model:
|
||||
# Configure the mock to avoid the TypeError
|
||||
mock_model.return_value.info = {}
|
||||
mock_model.return_value.name = "gpt-4" # Add a string name
|
||||
mock_model.return_value.validate_environment.return_value = {
|
||||
"missing_keys": [],
|
||||
"keys_in_environment": [],
|
||||
}
|
||||
|
||||
# Mock fuzzy_match_models to avoid string operations on MagicMock
|
||||
with patch("aider.models.fuzzy_match_models", return_value=[]):
|
||||
|
||||
main(
|
||||
["--no-verify-ssl", "--exit", "--yes"],
|
||||
input=DummyInput(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue