mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 16:48:13 +00:00
test: Update test environment and VCR configuration
- Add mock_openai_key fixture for consistent test API key - Update VCR configuration to record API interactions - Update test cases to handle None and whitespace inputs Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -8,6 +8,11 @@ from dotenv import load_dotenv
|
||||
|
||||
load_result = load_dotenv(override=True)
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_openai_key(monkeypatch):
|
||||
"""Mock OpenAI API key for VCR cassettes."""
|
||||
monkeypatch.setenv("OPENAI_API_KEY", "sk-fake-test-key-12345")
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_test_environment():
|
||||
"""Set up test environment with a temporary directory for SQLite storage."""
|
||||
|
||||
Reference in New Issue
Block a user