updated sync logic and fixed tests

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-10-10 09:24:27 -04:00
parent 2ba7b186f1
commit b378282cc0
2 changed files with 12 additions and 10 deletions

View file

@ -223,10 +223,11 @@ class TestMessageSyncing:
id="resp_123", created_at=1234567890, model="test-model", object="response", output=[], status="completed"
)
result = await responses_impl_with_conversations._sync_response_to_conversation(
"conv_test123", "Hello", mock_response
)
assert result is None
# matching the behavior of OpenAI here
with pytest.raises(Exception, match="API Error"):
await responses_impl_with_conversations._sync_response_to_conversation(
"conv_test123", "Hello", mock_response
)
async def test_sync_unsupported_types(self, responses_impl_with_conversations):
mock_response = OpenAIResponseObject(