add recordings

This commit is contained in:
Swapna Lekkala 2025-10-06 10:44:57 -07:00
parent 1b68392f92
commit 827529bd03
8 changed files with 3843 additions and 18 deletions

View file

@ -533,7 +533,7 @@ def test_openai_vector_store_attach_files_on_creation(compat_client_with_empty_s
# Create some files and attach them to the vector store
valid_file_ids = []
for i in range(3):
for i in range(2):
with BytesIO(f"This is a test file {i}".encode()) as file_buffer:
file_buffer.name = f"openai_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")
@ -589,7 +589,7 @@ def test_openai_vector_store_list_files(compat_client_with_empty_stores, client_
# Create some files and attach them to the vector store
file_ids = []
for i in range(3):
for i in range(2):
with BytesIO(f"This is a test file {i}".encode()) as file_buffer:
file_buffer.name = f"openai_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")
@ -708,7 +708,7 @@ def test_openai_vector_store_delete_file(compat_client_with_empty_stores, client
# Create some files and attach them to the vector store
file_ids = []
for i in range(3):
for i in range(2):
with BytesIO(f"This is a test file {i}".encode()) as file_buffer:
file_buffer.name = f"openai_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")
@ -840,7 +840,7 @@ def test_create_vector_store_files_duplicate_vector_store_name(compat_client_wit
# Create a vector store with files
file_ids = []
for i in range(3):
for i in range(2):
with BytesIO(f"This is a test file {i}".encode()) as file_buffer:
file_buffer.name = f"openai_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")
@ -968,7 +968,7 @@ def test_openai_vector_store_file_batch_list_files(compat_client_with_empty_stor
# Create multiple files
file_ids = []
for i in range(5):
for i in range(2):
with BytesIO(f"This is batch list test file {i}".encode()) as file_buffer:
file_buffer.name = f"batch_list_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")
@ -1051,7 +1051,7 @@ def test_openai_vector_store_file_batch_cancel(compat_client_with_empty_stores,
# Create a batch to test cancellation
file_ids = []
for i in range(50): # Batch size that allows time for cancellation
for i in range(2): # Batch size that allows time for cancellation
with BytesIO(f"This is batch cancel test file {i} with substantial content".encode()) as file_buffer:
file_buffer.name = f"batch_cancel_test_{i}.txt"
file = compat_client.files.create(file=file_buffer, purpose="assistants")