mirror of
https://github.com/Aider-AI/aider
synced 2026-04-26 01:25:17 +02:00
fix: Resolve MagicMock TypeError in test_no_verify_ssl_sets_model_info_manager
This commit is contained in:
@@ -691,10 +691,14 @@ 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"],
|
||||
|
||||
Reference in New Issue
Block a user