Commit 930662d9
Changed files (1)
tests
api_resources
tests/api_resources/test_responses.py
@@ -9,6 +9,7 @@ import pytest
from openai import OpenAI, AsyncOpenAI
from tests.utils import assert_matches_type
+from openai._utils import assert_signatures_in_sync
from openai.types.responses import (
Response,
)
@@ -340,6 +341,17 @@ class TestResponses:
)
+@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
+def test_parse_method_in_sync(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None:
+ checking_client: OpenAI | AsyncOpenAI = client if sync else async_client
+
+ assert_signatures_in_sync(
+ checking_client.responses.create,
+ checking_client.responses.parse,
+ exclude_params={"stream", "tools"},
+ )
+
+
class TestAsyncResponses:
parametrize = pytest.mark.parametrize(
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]