Skip to content

[python] Add Python mock API test for Azure Core Page withRelativeNextLink scenario#9685

Merged
msyyc merged 5 commits intomainfrom
copilot/add-test-case-for-mock-api
Feb 13, 2026
Merged

[python] Add Python mock API test for Azure Core Page withRelativeNextLink scenario#9685
msyyc merged 5 commits intomainfrom
copilot/add-test-case-for-mock-api

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Adds Python SDK test coverage for the new Azure_Core_Page_withRelativeNextLink Spector scenario from Azure/typespec-azure#3922, which tests pagination with relative nextLink URLs that clients must resolve against the service endpoint.

  • Dependency bump: @azure-tools/azure-http-specs0.1.0-alpha.38-dev.2 to pick up the new scenario
  • Sync test: test_list_with_relative_next_link in test_azure_core_page.py
  • Async test: test_list_with_relative_next_link in test_azure_core_page_async.py
  • Changelog: internal change entry for @typespec/http-client-python

Both tests paginate across two pages and assert id, name, and etag for each returned User:

def test_list_with_relative_next_link(client: PageClient):
    result = list(client.with_relative_next_link())
    assert len(result) == 2
    assert result[0].id == 1
    assert result[0].name == "User1"
    assert result[1].id == 2
    assert result[1].name == "User2"

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Azure/typespec-azure/pulls/3922
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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 Feb 11, 2026
Copilot AI changed the title [WIP] Add test case for Python SDK Spector mock API Add Python mock API test for Azure Core Page withRelativeNextLink scenario Feb 11, 2026
Copilot AI requested a review from msyyc February 11, 2026 12:17
@msyyc msyyc changed the title Add Python mock API test for Azure Core Page withRelativeNextLink scenario [python] Add Python mock API test for Azure Core Page withRelativeNextLink scenario Feb 12, 2026
@msyyc msyyc marked this pull request as ready for review February 12, 2026 01:13
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@9685
npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-client@9685

commit: 770f3a2

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

Add mock API test for Azure Core Page withRelativeNextLink scenario.

@msyyc msyyc added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit efbf17f Feb 13, 2026
26 checks passed
@msyyc msyyc deleted the copilot/add-test-case-for-mock-api branch February 13, 2026 10:32
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.

4 participants