mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix(tests): mock httpx in rpm limit pass-through tests to avoid real Cohere API calls
This commit is contained in:
parent
7c8f2274ca
commit
89e03ca1d3
1 changed files with 4 additions and 2 deletions
|
|
@ -173,8 +173,9 @@ async def test_pass_through_endpoint_rerank(client):
|
|||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_pass_through_endpoint_rpm_limit(
|
||||
client, auth, rpm_limit, requests_to_make, expected_status_codes, num_users
|
||||
client, monkeypatch, auth, rpm_limit, requests_to_make, expected_status_codes, num_users
|
||||
):
|
||||
monkeypatch.setattr("httpx.AsyncClient.request", mock_request)
|
||||
import litellm
|
||||
from litellm.proxy._types import UserAPIKeyAuth
|
||||
from litellm.proxy.proxy_server import ProxyLogging, hash_token, user_api_key_cache
|
||||
|
|
@ -273,8 +274,9 @@ async def test_pass_through_endpoint_rpm_limit(
|
|||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_pass_through_endpoint_sequential_rpm_limit(
|
||||
client, auth, rpm_limit, requests_to_make, expected_status_codes
|
||||
client, monkeypatch, auth, rpm_limit, requests_to_make, expected_status_codes
|
||||
):
|
||||
monkeypatch.setattr("httpx.AsyncClient.request", mock_request)
|
||||
import litellm
|
||||
from litellm.proxy._types import UserAPIKeyAuth
|
||||
from litellm.proxy.proxy_server import ProxyLogging, hash_token, user_api_key_cache
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue