[python] Add ARM operation-templates nextLink paging coverage for mock API tests - #11724
[python] Add ARM operation-templates nextLink paging coverage for mock API tests#11724Yuchao Yan (msyyc) with Copilot wants to merge 3 commits into
Conversation
|
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>
commit: |
There was a problem hiding this comment.
Pull request overview
This pull request updates the http-client-python mock API tests to validate ARM operation-templates POST action paging properly follows nextLink continuations, matching the updated azure-http-specs paging contract.
Changes:
- Extend sync and async mock API paging tests to assert a second page is fetched (2 items total) and validate second-page content (
vm2,sending_metrics == False). - Bump
@azure-tools/azure-http-specsto0.1.0-alpha.45-dev.3so the updated paging shape (includingnextLink) is available. - Add a Chronus entry documenting the internal test-coverage update.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/http-client-python/tests/mock_api/azure/test_azure_arm_operationtemplates.py | Strengthens sync paging test by asserting second-page traversal and content. |
| packages/http-client-python/tests/mock_api/azure/asynctests/test_azure_arm_operationtemplates_async.py | Strengthens async paging test by asserting second-page traversal and content. |
| packages/http-client-python/package.json | Updates @azure-tools/azure-http-specs version to pick up the nextLink paging contract. |
| packages/http-client-python/package-lock.json | Locks the updated @azure-tools/azure-http-specs tarball/version and metadata. |
| .chronus/changes/python-spector-tests-arm-operationtemplates-nextlink-2026-8-19-6-0-0.md | Adds an internal changelog entry for the added paging coverage. |
Files not reviewed (1)
- packages/http-client-python/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
All changed packages have been documented.
Show changes
|
Python emitter diffBaseline Diff summary: 4 file(s), +4 / -4 Rendered diff: inline on the run summary, or the emitter-diff-html artifact. Informational check (eng/emitter-diff); does not block the PR. |
|
You can try these changes here
|
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_pagingconsumes thenextLinkpage, not just the first page.Spec version alignment
@azure-tools/azure-http-specsinpackages/http-client-pythonto0.1.0-alpha.45-dev.3so the new paging contract (@nextLinkonMonitoredResourceListResponse.nextLink) is available to the test pipeline.Mock API paging assertions (sync + async)
tests/mock_api/azure/test_azure_arm_operationtemplates.pytests/mock_api/azure/asynctests/test_azure_arm_operationtemplates_async.pytest_paging_post_action_pagingnow asserts two items are returned and validates second-page content (vm2,sending_metrics=False), confirming continuation traversal.Changelog
@typespec/http-client-pythondescribing the new nextLink paging coverage.