Skip to content

Commit

Permalink
fix: openai integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Dec 1, 2024
1 parent fe135a5 commit fb1544d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/encoders/test_openai_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestOpenAIEncoder:
os.environ.get("OPENAI_API_KEY") is None, reason="OpenAI API key required"
)
def test_openai_encoder_init_success(self, openai_encoder):
assert openai_encoder.client is not None
assert openai_encoder._client is not None

@pytest.mark.skipif(
os.environ.get("OPENAI_API_KEY") is None, reason="OpenAI API key required"
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_openai_encoder_call_no_truncation(self, openai_encoder):
)
def test_openai_encoder_call_uninitialized_client(self, openai_encoder):
# Set the client to None to simulate an uninitialized client
openai_encoder.client = None
openai_encoder._client = None
with pytest.raises(ValueError) as e:
openai_encoder(["test document"])
assert "OpenAI client is not initialized." in str(e.value)

0 comments on commit fb1544d

Please sign in to comment.