mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
fix: Patch requests.get
directly in tests
This commit is contained in:
parent
69fcdd4a13
commit
27015c2c62
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import time
|
|||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest.mock import mock_open, patch
|
||||
import requests
|
||||
|
||||
from aider.models import Model, get_model_info
|
||||
|
||||
|
@ -32,7 +33,7 @@ class TestModels(unittest.TestCase):
|
|||
@patch("aider.models.Path.stat")
|
||||
@patch("aider.models.safe_read_json")
|
||||
@patch("aider.models.safe_write_json")
|
||||
@patch("aider.models.requests.get")
|
||||
@patch("requests.get")
|
||||
def test_get_model_info(self, mock_get, mock_write_json, mock_read_json, mock_stat, mock_home):
|
||||
# Setup
|
||||
mock_home.return_value = Path("/mock/home")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue