diff --git a/tests/api_resources/test_finetunings.py b/tests/api_resources/test_finetunings.py index 36728f7..8a67eb4 100644 --- a/tests/api_resources/test_finetunings.py +++ b/tests/api_resources/test_finetunings.py @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Dataherald) -> None: "model_provider": "model_provider", }, db_connection_id="db_connection_id", - golden_sqls=["string", "string", "string"], + golden_sqls=["string"], metadata={}, ) assert_matches_type(FinetuningResponse, finetuning, path=["response"]) @@ -202,7 +202,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncDataherald "model_provider": "model_provider", }, db_connection_id="db_connection_id", - golden_sqls=["string", "string", "string"], + golden_sqls=["string"], metadata={}, ) assert_matches_type(FinetuningResponse, finetuning, path=["response"]) diff --git a/tests/api_resources/test_golden_sqls.py b/tests/api_resources/test_golden_sqls.py index ce37aa4..9c7f3f5 100644 --- a/tests/api_resources/test_golden_sqls.py +++ b/tests/api_resources/test_golden_sqls.py @@ -141,17 +141,7 @@ def test_method_upload(self, client: Dataherald) -> None: "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) assert_matches_type(GoldenSqlUploadResponse, golden_sql, path=["response"]) @@ -164,17 +154,7 @@ def test_raw_response_upload(self, client: Dataherald) -> None: "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) @@ -191,17 +171,7 @@ def test_streaming_response_upload(self, client: Dataherald) -> None: "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) as response: assert not response.is_closed @@ -336,17 +306,7 @@ async def test_method_upload(self, async_client: AsyncDataherald) -> None: "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) assert_matches_type(GoldenSqlUploadResponse, golden_sql, path=["response"]) @@ -359,17 +319,7 @@ async def test_raw_response_upload(self, async_client: AsyncDataherald) -> None: "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) @@ -386,17 +336,7 @@ async def test_streaming_response_upload(self, async_client: AsyncDataherald) -> "db_connection_id": "db_connection_id", "prompt_text": "prompt_text", "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, - { - "db_connection_id": "db_connection_id", - "prompt_text": "prompt_text", - "sql": "sql", - }, + } ], ) as response: assert not response.is_closed diff --git a/tests/api_resources/test_table_descriptions.py b/tests/api_resources/test_table_descriptions.py index 88ab64e..2f761e7 100644 --- a/tests/api_resources/test_table_descriptions.py +++ b/tests/api_resources/test_table_descriptions.py @@ -72,35 +72,17 @@ def test_method_update_with_all_params(self, client: Dataherald) -> None: id="id", columns=[ { - "categories": ["string", "string", "string"], + "categories": ["string"], "data_type": "data_type", "description": "description", "foreign_key": {}, "is_primary_key": True, "low_cardinality": True, "name": "name", - }, - { - "categories": ["string", "string", "string"], - "data_type": "data_type", - "description": "description", - "foreign_key": {}, - "is_primary_key": True, - "low_cardinality": True, - "name": "name", - }, - { - "categories": ["string", "string", "string"], - "data_type": "data_type", - "description": "description", - "foreign_key": {}, - "is_primary_key": True, - "low_cardinality": True, - "name": "name", - }, + } ], description="description", - examples=[{}, {}, {}], + examples=[{}], metadata={}, ) assert_matches_type(TableDescriptionResponse, table_description, path=["response"]) @@ -178,22 +160,14 @@ def test_streaming_response_list(self, client: Dataherald) -> None: @parametrize def test_method_sync_schemas(self, client: Dataherald) -> None: table_description = client.table_descriptions.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) assert_matches_type(TableDescriptionSyncSchemasResponse, table_description, path=["response"]) @parametrize def test_raw_response_sync_schemas(self, client: Dataherald) -> None: response = client.table_descriptions.with_raw_response.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) assert response.is_closed is True @@ -204,11 +178,7 @@ def test_raw_response_sync_schemas(self, client: Dataherald) -> None: @parametrize def test_streaming_response_sync_schemas(self, client: Dataherald) -> None: with client.table_descriptions.with_streaming_response.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -273,35 +243,17 @@ async def test_method_update_with_all_params(self, async_client: AsyncDataherald id="id", columns=[ { - "categories": ["string", "string", "string"], + "categories": ["string"], "data_type": "data_type", "description": "description", "foreign_key": {}, "is_primary_key": True, "low_cardinality": True, "name": "name", - }, - { - "categories": ["string", "string", "string"], - "data_type": "data_type", - "description": "description", - "foreign_key": {}, - "is_primary_key": True, - "low_cardinality": True, - "name": "name", - }, - { - "categories": ["string", "string", "string"], - "data_type": "data_type", - "description": "description", - "foreign_key": {}, - "is_primary_key": True, - "low_cardinality": True, - "name": "name", - }, + } ], description="description", - examples=[{}, {}, {}], + examples=[{}], metadata={}, ) assert_matches_type(TableDescriptionResponse, table_description, path=["response"]) @@ -379,22 +331,14 @@ async def test_streaming_response_list(self, async_client: AsyncDataherald) -> N @parametrize async def test_method_sync_schemas(self, async_client: AsyncDataherald) -> None: table_description = await async_client.table_descriptions.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) assert_matches_type(TableDescriptionSyncSchemasResponse, table_description, path=["response"]) @parametrize async def test_raw_response_sync_schemas(self, async_client: AsyncDataherald) -> None: response = await async_client.table_descriptions.with_raw_response.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) assert response.is_closed is True @@ -405,11 +349,7 @@ async def test_raw_response_sync_schemas(self, async_client: AsyncDataherald) -> @parametrize async def test_streaming_response_sync_schemas(self, async_client: AsyncDataherald) -> None: async with async_client.table_descriptions.with_streaming_response.sync_schemas( - body=[ - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - {"db_connection_id": "db_connection_id"}, - ], + body=[{"db_connection_id": "db_connection_id"}], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"