mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Update tests/test_litellm/llms/openai/evals/test_openai_evals_transformation.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
ea72ffb03b
commit
782b048372
1 changed files with 2 additions and 3 deletions
|
|
@ -25,13 +25,12 @@ def test_validate_environment_sets_headers(config: OpenAIEvalsConfig):
|
|||
assert result["Content-Type"] == "application/json"
|
||||
|
||||
|
||||
def test_validate_environment_requires_api_key(config: OpenAIEvalsConfig):
|
||||
def test_validate_environment_requires_api_key(config: OpenAIEvalsConfig, monkeypatch):
|
||||
"""Test that validate_environment raises error when no API key is provided"""
|
||||
import os
|
||||
|
||||
# Ensure OPENAI_API_KEY environment variable is None before validation
|
||||
if "OPENAI_API_KEY" in os.environ:
|
||||
del os.environ["OPENAI_API_KEY"]
|
||||
monkeypatch.delenv("OPENAI_API_KEY", raising=False)
|
||||
|
||||
headers: dict = {}
|
||||
params = GenericLiteLLMParams()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue