Skip to content
Snippets Groups Projects
Commit 2608dcb6 authored by James Briggs's avatar James Briggs
Browse files

fix: openai mock

parent 7862d39d
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,6 @@ def cohere_encoder(mocker): ...@@ -126,7 +126,6 @@ def cohere_encoder(mocker):
def openai_encoder(mocker): def openai_encoder(mocker):
# Mock the OpenAI client creation and API calls # Mock the OpenAI client creation and API calls
mocker.patch("openai.OpenAI") mocker.patch("openai.OpenAI")
mocker.patch("semantic_router.encoders.openai.OpenAI")
# Mock the __call__ method # Mock the __call__ method
mocker.patch.object(OpenAIEncoder, "__call__", side_effect=mock_encoder_call) mocker.patch.object(OpenAIEncoder, "__call__", side_effect=mock_encoder_call)
...@@ -141,8 +140,6 @@ def openai_encoder(mocker): ...@@ -141,8 +140,6 @@ def openai_encoder(mocker):
encoder = OpenAIEncoder( encoder = OpenAIEncoder(
name="text-embedding-3-small", openai_api_key="test_api_key" name="text-embedding-3-small", openai_api_key="test_api_key"
) )
# Mock the initialization/validation step
mocker.patch.object(encoder, "_validate_api_key")
return encoder return encoder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment