What
The test fixture for FeedbackEngine calls get_cohere_client(), which calls CohereClient(), which reads settings.cohere_api_key. If COHERE_API_KEY is not set in the environment, pydantic-settings raises a ValidationError during Settings() instantiation, and the test fixture fails.
Why
The tests for _compute_score and quick_feedback do not need the Cohere client at all. The fixture should mock the Cohere client.
Scope
- Mock the Cohere client in the fixture
- Tests should not require API keys
Acceptance Criteria
Technical Context
- File:
tests/test_feedback_engine.py, lines 13-14, 43-44
What
The test fixture for
FeedbackEnginecallsget_cohere_client(), which callsCohereClient(), which readssettings.cohere_api_key. IfCOHERE_API_KEYis not set in the environment,pydantic-settingsraises aValidationErrorduringSettings()instantiation, and the test fixture fails.Why
The tests for
_compute_scoreandquick_feedbackdo not need the Cohere client at all. The fixture should mock the Cohere client.Scope
Acceptance Criteria
COHERE_API_KEYTechnical Context
tests/test_feedback_engine.py, lines 13-14, 43-44