Skip to content
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/http-client-python"
---

Add mock API test case for the `AlternateInitialVerb` POST pagination scenario where the initial request uses POST with a filter body and subsequent next link requests use GET.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/http-client-python"
---

Skip 8 failing client structure test cases pending `@azure-tools/typespec-client-generator-core` upgrade to 0.67.0
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async def test_structure_multiclient():
await client_b.renamed_six()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
@pytest.mark.asyncio
async def test_structure_renamed_operation():
client = RenamedOperationClient(endpoint="http://localhost:3000", client=ClientType.RENAMED_OPERATION)
Expand All @@ -50,6 +51,7 @@ async def test_structure_renamed_operation():
await client.renamed_six()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
@pytest.mark.asyncio
async def test_structure_two_operation_group():
client = TwoOperationGroupClient(endpoint="http://localhost:3000", client=ClientType.TWO_OPERATION_GROUP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from client.structure.clientoperationgroup.aio import FirstClient, SecondClient


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
@pytest.mark.asyncio
async def test_first_client_operations():
client = FirstClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
Expand All @@ -20,6 +21,7 @@ async def test_first_client_operations():
await client.four()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
@pytest.mark.asyncio
async def test_second_client_operations():
client = SecondClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import pytest
from client.structure.service.models import ClientType
from client.structure.service import ServiceClient
from client.structure.multiclient import ClientAClient, ClientBClient
Expand Down Expand Up @@ -35,6 +36,7 @@ def test_structure_multiclient():
client_b.renamed_six()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
def test_structure_renamed_operation():
client = RenamedOperationClient(endpoint="http://localhost:3000", client=ClientType.RENAMED_OPERATION)
client.renamed_one()
Expand All @@ -46,6 +48,7 @@ def test_structure_renamed_operation():
client.renamed_six()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
def test_structure_two_operation_group():
client = TwoOperationGroupClient(endpoint="http://localhost:3000", client=ClientType.TWO_OPERATION_GROUP)
client.one()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import pytest
from client.structure.clientoperationgroup.models import ClientType
from client.structure.clientoperationgroup import FirstClient, SecondClient


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
def test_first_client_operations():
client = FirstClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)

Expand All @@ -18,6 +20,7 @@ def test_first_client_operations():
client.four()


@pytest.mark.skip(reason="will reopen the cases after upgrade `@azure-tools/typespec-client-generator-core` to 0.67.0")
def test_second_client_operations():
client = SecondClient(endpoint="http://localhost:3000", client=ClientType.CLIENT_OPERATION_GROUP)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# --------------------------------------------------------------------------
import pytest
from payload.pageable.aio import PageableClient
from payload.pageable.serverdrivenpagination.alternateinitialverb.models import Filter


@pytest.fixture
Expand Down Expand Up @@ -125,3 +126,9 @@ async def test_xml_pagination_list_with_continuation(client: PageableClient):
async def test_xml_pagination_list_with_next_link(client: PageableClient):
result = [p async for p in client.xml_pagination.list_with_next_link()]
assert_result(result)


@pytest.mark.asyncio
async def test_alternate_initial_verb_post(client: PageableClient):
result = [p async for p in client.server_driven_pagination.alternate_initial_verb.post(Filter(filter="foo eq bar"))]
assert_result(result)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# --------------------------------------------------------------------------
import pytest
from payload.pageable import PageableClient
from payload.pageable.serverdrivenpagination.alternateinitialverb.models import Filter


@pytest.fixture
Expand Down Expand Up @@ -91,3 +92,8 @@ def test_xml_pagination_list_with_continuation(client: PageableClient):
def test_xml_pagination_list_with_next_link(client: PageableClient):
result = list(client.xml_pagination.list_with_next_link())
assert_result(result)


def test_alternate_initial_verb_post(client: PageableClient):
result = list(client.server_driven_pagination.alternate_initial_verb.post(Filter(filter="foo eq bar")))
assert_result(result)
54 changes: 27 additions & 27 deletions packages/http-client-python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions packages/http-client-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"@azure-tools/typespec-autorest": ">=0.66.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.66.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.66.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.65.1 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.66.1 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.66.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.66.2 <1.0.0",
"@typespec/compiler": "^1.10.0",
"@typespec/http": "^1.10.0",
"@typespec/openapi": "^1.10.0",
Expand All @@ -80,9 +80,9 @@
"@azure-tools/typespec-autorest": "~0.66.0",
"@azure-tools/typespec-azure-core": "~0.66.0",
"@azure-tools/typespec-azure-resource-manager": "~0.66.0",
"@azure-tools/typespec-azure-rulesets": "~0.65.1",
"@azure-tools/typespec-client-generator-core": "~0.66.1",
"@azure-tools/azure-http-specs": "0.1.0-alpha.39-dev.3",
"@azure-tools/typespec-azure-rulesets": "~0.66.0",
"@azure-tools/typespec-client-generator-core": "~0.66.2",
"@azure-tools/azure-http-specs": "0.1.0-alpha.39-dev.4",
"@typespec/compiler": "^1.10.0",
"@typespec/http": "^1.10.0",
"@typespec/openapi": "^1.10.0",
Expand All @@ -94,7 +94,7 @@
"@typespec/sse": "~0.80.0",
"@typespec/streams": "~0.80.0",
"@typespec/xml": "~0.80.0",
"@typespec/http-specs": "0.1.0-alpha.35-dev.1",
"@typespec/http-specs": "0.1.0-alpha.35-dev.4",
"@types/js-yaml": "~4.0.5",
"@types/node": "~25.0.2",
"@types/semver": "7.5.8",
Expand Down
Loading