Skip to content

Commit 2552675

Browse files
committed
dep injection try 3
1 parent d0c0f75 commit 2552675

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server_tests/conftest.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import cast
44
from unittest.mock import patch
55

6+
import openai
67
import psycopg2
78
import pytest
89
import redis
@@ -66,6 +67,7 @@ def redis_host():
6667
@pytest.fixture(scope="session")
6768
def mock_openai_chat_completion():
6869
"""Mock the OpenAI chat completion API."""
70+
openai.api_key = "dummy_key"
6971
with patch("openai.chat.completions.create") as mock:
7072
mock.return_value = ChatCompletion(
7173
id="foo",

0 commit comments

Comments
 (0)