Skip to content

Commit 0fe75a2

Browse files
committed
chore(tests): ensure vector store files create and poll method is in sync
1 parent 3152134 commit 0fe75a2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/api_resources/vector_stores/test_files.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from openai import OpenAI, AsyncOpenAI
1111
from tests.utils import assert_matches_type
12+
from openai._utils import assert_signatures_in_sync
1213
from openai.pagination import SyncPage, AsyncPage, SyncCursorPage, AsyncCursorPage
1314
from openai.types.vector_stores import (
1415
VectorStoreFile,
@@ -625,3 +626,14 @@ async def test_path_params_content(self, async_client: AsyncOpenAI) -> None:
625626
file_id="",
626627
vector_store_id="vs_abc123",
627628
)
629+
630+
631+
@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
632+
def test_create_and_poll_method_in_sync(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None:
633+
checking_client: OpenAI | AsyncOpenAI = client if sync else async_client
634+
635+
assert_signatures_in_sync(
636+
checking_client.vector_stores.files.create,
637+
checking_client.vector_stores.files.create_and_poll,
638+
exclude_params={"extra_headers", "extra_query", "extra_body", "timeout"},
639+
)

0 commit comments

Comments
 (0)