From 8e2246ec5cf3e8ca28d58b5e5ba37993d71cba9d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 5 Mar 2025 18:55:17 -0800 Subject: [PATCH] fix: Resolve MagicMock TypeError in test_no_verify_ssl_sets_model_info_manager --- tests/basic/test_main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/basic/test_main.py b/tests/basic/test_main.py index f8a6f3860..4c90889af 100644 --- a/tests/basic/test_main.py +++ b/tests/basic/test_main.py @@ -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"],