diff --git a/tests/api_resources/sys/projects/test_api_keys.py b/tests/api_resources/sys/projects/test_api_keys.py index cf170f47..9a7325f0 100644 --- a/tests/api_resources/sys/projects/test_api_keys.py +++ b/tests/api_resources/sys/projects/test_api_keys.py @@ -24,7 +24,7 @@ class TestAPIKeys: def test_method_create(self, client: Asktable) -> None: api_key = client.sys.projects.api_keys.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) assert_matches_type(APIKeyCreateResponse, api_key, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Asktable) -> None: def test_raw_response_create(self, client: Asktable) -> None: response = client.sys.projects.api_keys.with_raw_response.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) assert response.is_closed is True @@ -44,7 +44,7 @@ def test_raw_response_create(self, client: Asktable) -> None: def test_streaming_response_create(self, client: Asktable) -> None: with client.sys.projects.api_keys.with_streaming_response.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -59,7 +59,7 @@ def test_path_params_create(self, client: Asktable) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"): client.sys.projects.api_keys.with_raw_response.create( project_id="", - ak_role="sys", + ak_role="admin", ) @parametrize @@ -159,7 +159,7 @@ def test_method_create_token(self, client: Asktable) -> None: def test_method_create_token_with_all_params(self, client: Asktable) -> None: api_key = client.sys.projects.api_keys.create_token( project_id="project_id", - ak_role="sys", + ak_role="asker", chat_role={ "role_id": "1", "role_variables": {"id": "42"}, @@ -208,7 +208,7 @@ class TestAsyncAPIKeys: async def test_method_create(self, async_client: AsyncAsktable) -> None: api_key = await async_client.sys.projects.api_keys.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) assert_matches_type(APIKeyCreateResponse, api_key, path=["response"]) @@ -216,7 +216,7 @@ async def test_method_create(self, async_client: AsyncAsktable) -> None: async def test_raw_response_create(self, async_client: AsyncAsktable) -> None: response = await async_client.sys.projects.api_keys.with_raw_response.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) assert response.is_closed is True @@ -228,7 +228,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.sys.projects.api_keys.with_streaming_response.create( project_id="project_id", - ak_role="sys", + ak_role="admin", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -243,7 +243,7 @@ async def test_path_params_create(self, async_client: AsyncAsktable) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"): await async_client.sys.projects.api_keys.with_raw_response.create( project_id="", - ak_role="sys", + ak_role="admin", ) @parametrize @@ -343,7 +343,7 @@ async def test_method_create_token(self, async_client: AsyncAsktable) -> None: async def test_method_create_token_with_all_params(self, async_client: AsyncAsktable) -> None: api_key = await async_client.sys.projects.api_keys.create_token( project_id="project_id", - ak_role="sys", + ak_role="asker", chat_role={ "role_id": "1", "role_variables": {"id": "42"}, diff --git a/tests/api_resources/test_auth.py b/tests/api_resources/test_auth.py index a834d2c3..18a08f28 100644 --- a/tests/api_resources/test_auth.py +++ b/tests/api_resources/test_auth.py @@ -25,7 +25,7 @@ def test_method_create_token(self, client: Asktable) -> None: @parametrize def test_method_create_token_with_all_params(self, client: Asktable) -> None: auth = client.auth.create_token( - ak_role="sys", + ak_role="asker", chat_role={ "role_id": "1", "role_variables": {"id": "42"}, @@ -92,7 +92,7 @@ async def test_method_create_token(self, async_client: AsyncAsktable) -> None: @parametrize async def test_method_create_token_with_all_params(self, async_client: AsyncAsktable) -> None: auth = await async_client.auth.create_token( - ak_role="sys", + ak_role="asker", chat_role={ "role_id": "1", "role_variables": {"id": "42"}, diff --git a/tests/api_resources/test_datasources.py b/tests/api_resources/test_datasources.py index 8d85594f..758b1d57 100644 --- a/tests/api_resources/test_datasources.py +++ b/tests/api_resources/test_datasources.py @@ -134,7 +134,7 @@ def test_method_update_with_all_params(self, client: Asktable) -> None: engine="mysql", field_count=1, meta_error="error message", - meta_status="processing", + meta_status="success", name="用户库", sample_questions="示例问题", schema_count=1, @@ -551,7 +551,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncAsktable) engine="mysql", field_count=1, meta_error="error message", - meta_status="processing", + meta_status="success", name="用户库", sample_questions="示例问题", schema_count=1,