Skip to content

Fix tests#21

Open
brylie wants to merge 1 commit intomainfrom
fix-tests-1
Open

Fix tests#21
brylie wants to merge 1 commit intomainfrom
fix-tests-1

Conversation

@brylie
Copy link
Copy Markdown
Owner

@brylie brylie commented Jul 6, 2024

Related to #19

Fix tests by setting the OPENAI_API_KEY environment variable in the test files.

  • tests/test_chat_gpt_client.py

    • Add monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") to the test_get_chat_response_with_history_success function.
    • Add monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") to the test_get_chat_response_with_history_api_error function.
    • Add monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") to the test_get_chat_response_with_history_empty_message function.
    • Add monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") to the test_get_chat_response_with_history_parameterized function.
  • tests/test_main.py

    • Add monkeypatch.setenv("OPENAI_API_KEY", "test_api_key") to the mock_services fixture.

For more details, open the Copilot Workspace session.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant