Skip to content

[python] Add ARM operation-templates nextLink paging coverage for mock API tests - #11724

Draft
Yuchao Yan (msyyc) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-test-case-for-5214
Draft

[python] Add ARM operation-templates nextLink paging coverage for mock API tests#11724
Yuchao Yan (msyyc) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-test-case-for-5214

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This updates the Python mock API suite to cover the ARM operation-templates paging scenario introduced in Azure/typespec-azure#5214. The tests now validate that post_action_paging consumes the nextLink page, not just the first page.

  • Spec version alignment

    • Bumped @azure-tools/azure-http-specs in packages/http-client-python to 0.1.0-alpha.45-dev.3 so the new paging contract (@nextLink on MonitoredResourceListResponse.nextLink) is available to the test pipeline.
  • Mock API paging assertions (sync + async)

    • Extended:
      • tests/mock_api/azure/test_azure_arm_operationtemplates.py
      • tests/mock_api/azure/asynctests/test_azure_arm_operationtemplates_async.py
    • test_paging_post_action_paging now asserts two items are returned and validates second-page content (vm2, sending_metrics=False), confirming continuation traversal.
  • Changelog

    • Added an internal Chronus entry for @typespec/http-client-python describing the new nextLink paging coverage.
items = list(result)
assert len(items) == 2
assert items[0].id.endswith("/vm1")
assert items[1].id.endswith("/vm2")
assert items[1].sending_metrics is False

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Aug 19, 2026
Copilot AI changed the title [WIP] Add test case for Azure typespec PR 5214 [python] Add ARM operation-templates nextLink paging coverage for mock API tests Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/Azure/typespec-azure/pull/5214

2 participants