Skip to content
Snippets Groups Projects
Commit f2936780 authored by Ismail Ashraq's avatar Ismail Ashraq
Browse files

fix tests

parent fb789551
No related branches found
No related tags found
No related merge requests found
import os
import pytest
from openai import OpenAIError
from semantic_router.encoders.base import BaseEncoder
from semantic_router.encoders.openai import OpenAIEncoder
......@@ -40,7 +41,7 @@ class TestOpenAIEncoder:
os.environ.get("OPENAI_API_KEY") is None, reason="OpenAI API key required"
)
def test_openai_encoder_call_no_truncation(self, openai_encoder):
with pytest.raises(ValueError) as _:
with pytest.raises(OpenAIError) as _:
# default truncation is True
openai_encoder([long_doc], truncate=False)
......
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