Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 82
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-9cb2534e1d18be02424ad6c8b5843957658c9cf1a42ced4ba6fc177c9843df50.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-89d98c96d6f0441614ec82ee050604faf290f145703bbc2538ad22697ff5a473.yml
16 changes: 8 additions & 8 deletions tests/api_resources/single_turn/test_q2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class TestQ2a:
def test_method_create(self, client: Asktable) -> None:
q2a = client.single_turn.q2a.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)
assert_matches_type(Q2aResponse, q2a, path=["response"])

@parametrize
def test_method_create_with_all_params(self, client: Asktable) -> None:
q2a = client.single_turn.q2a.create(
datasource_id="datasource_id",
question="question",
question="xxx",
max_rows=0,
role_id="role_id",
role_variables={},
Expand All @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
def test_raw_response_create(self, client: Asktable) -> None:
response = client.single_turn.q2a.with_raw_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)

assert response.is_closed is True
Expand All @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Asktable) -> None:
def test_streaming_response_create(self, client: Asktable) -> None:
with client.single_turn.q2a.with_streaming_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -106,15 +106,15 @@ class TestAsyncQ2a:
async def test_method_create(self, async_client: AsyncAsktable) -> None:
q2a = await async_client.single_turn.q2a.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)
assert_matches_type(Q2aResponse, q2a, path=["response"])

@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncAsktable) -> None:
q2a = await async_client.single_turn.q2a.create(
datasource_id="datasource_id",
question="question",
question="xxx",
max_rows=0,
role_id="role_id",
role_variables={},
Expand All @@ -126,7 +126,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
response = await async_client.single_turn.q2a.with_raw_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)

assert response.is_closed is True
Expand All @@ -138,7 +138,7 @@ async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
async def test_streaming_response_create(self, async_client: AsyncAsktable) -> None:
async with async_client.single_turn.q2a.with_streaming_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/single_turn/test_q2s.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class TestQ2s:
def test_method_create(self, client: Asktable) -> None:
q2 = client.single_turn.q2s.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)
assert_matches_type(Q2sResponse, q2, path=["response"])

@parametrize
def test_method_create_with_all_params(self, client: Asktable) -> None:
q2 = client.single_turn.q2s.create(
datasource_id="datasource_id",
question="question",
question="xxx",
role_id="role_id",
role_variables={},
)
Expand All @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Asktable) -> None:
def test_raw_response_create(self, client: Asktable) -> None:
response = client.single_turn.q2s.with_raw_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)

assert response.is_closed is True
Expand All @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Asktable) -> None:
def test_streaming_response_create(self, client: Asktable) -> None:
with client.single_turn.q2s.with_streaming_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -104,15 +104,15 @@ class TestAsyncQ2s:
async def test_method_create(self, async_client: AsyncAsktable) -> None:
q2 = await async_client.single_turn.q2s.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)
assert_matches_type(Q2sResponse, q2, path=["response"])

@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncAsktable) -> None:
q2 = await async_client.single_turn.q2s.create(
datasource_id="datasource_id",
question="question",
question="xxx",
role_id="role_id",
role_variables={},
)
Expand All @@ -122,7 +122,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncAsktable)
async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
response = await async_client.single_turn.q2s.with_raw_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
)

assert response.is_closed is True
Expand All @@ -134,7 +134,7 @@ async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
async def test_streaming_response_create(self, async_client: AsyncAsktable) -> None:
async with async_client.single_turn.q2s.with_streaming_response.create(
datasource_id="datasource_id",
question="question",
question="xxx",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down