Skip to content

Test fixture requires COHERE_API_KEY for non-API tests #10

Description

@DeFiVC

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

  • Tests run without COHERE_API_KEY
  • Non-API tests don't depend on external services

Technical Context

  • File: tests/test_feedback_engine.py, lines 13-14, 43-44

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions