chore: delete all cassettes and update conftest

This commit is contained in:
Greyson LaLonde
2025-11-08 01:54:25 -05:00
parent 996c53228b
commit b9bc5714c3
41 changed files with 46 additions and 5810 deletions

View File

@@ -12,8 +12,8 @@ from crewai.task import Task
@pytest.fixture(autouse=True)
def mock_google_api_key():
"""Automatically mock GOOGLE_API_KEY for all tests in this module."""
with patch.dict(os.environ, {"GOOGLE_API_KEY": "test-key"}):
"""Automatically mock GEMINI_API_KEY for all tests in this module."""
with patch.dict(os.environ, {"GEMINI_API_KEY": "test-key"}):
yield
@@ -429,10 +429,10 @@ def test_gemini_vertex_ai_setup():
def test_gemini_api_key_configuration():
"""
Test that API key configuration works for both GOOGLE_API_KEY and GEMINI_API_KEY
Test that API key configuration works for both GEMINI_API_KEY and GEMINI_API_KEY
"""
# Test with GOOGLE_API_KEY
with patch.dict(os.environ, {"GOOGLE_API_KEY": "test-google-key"}):
# Test with GEMINI_API_KEY
with patch.dict(os.environ, {"GEMINI_API_KEY": "test-google-key"}):
llm = LLM(model="google/gemini-2.0-flash-001")
from crewai.llms.providers.gemini.completion import GeminiCompletion
@@ -611,7 +611,7 @@ def test_gemini_environment_variable_api_key():
"""
Test that Google API key is properly loaded from environment
"""
with patch.dict(os.environ, {"GOOGLE_API_KEY": "test-google-key"}):
with patch.dict(os.environ, {"GEMINI_API_KEY": "test-google-key"}):
llm = LLM(model="google/gemini-2.0-flash-001")
assert llm.client is not None

View File

@@ -16,8 +16,8 @@ def setup_provider_api_keys(monkeypatch):
monkeypatch.setenv("OPENAI_API_KEY", "sk-test-key-dummy")
if "ANTHROPIC_API_KEY" not in os.environ:
monkeypatch.setenv("ANTHROPIC_API_KEY", "sk-ant-test-key-dummy")
if "GOOGLE_API_KEY" not in os.environ:
monkeypatch.setenv("GOOGLE_API_KEY", "test-google-key-dummy")
if "GEMINI_API_KEY" not in os.environ:
monkeypatch.setenv("GEMINI_API_KEY", "test-google-key-dummy")
class DummyInterceptor(BaseInterceptor[httpx.Request, httpx.Response]):