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"],