Skip to content

[python] Add mock API test for Azure_Core_Page_withRelativeNextLink scenario#9852

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-3922
Closed

[python] Add mock API test for Azure_Core_Page_withRelativeNextLink scenario#9852
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-3922

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

Adds Python SDK test coverage for the Azure_Core_Page_withRelativeNextLink Spector scenario (Azure/typespec-azure#3922), which validates that the generated client correctly resolves relative nextLink URLs against the service endpoint during pagination.

  • Sync + async tests in test_azure_core_page.py / test_azure_core_page_async.py paginating two pages and asserting id, name, and etag per item
  • Dependency bump: @azure-tools/azure-http-specs0.1.0-alpha.38-dev.2 to pick up the new scenario
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[0].etag == "11bdc430-65e8-45ad-81d9-8ffa60d55b59"
    assert result[1].id == 2
    assert result[1].name == "User2"
    assert result[1].etag == "11bdc430-65e8-45ad-81d9-8ffa60d55b59"
Original prompt

This section details on the original issue you should resolve

<issue_title>[python] add test case for Azure/typespec-azure#3922</issue_title>
<issue_description>follow skill https://github.com/microsoft/typespec/blob/main/.github/skills/python-sdk-spector-mock-api-tests/SKILL.md to write test case for Azure/typespec-azure#3922</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…nario

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test case for Azure typespec pull request 3922 [python] Add mock API test for Azure_Core_Page_withRelativeNextLink scenario Mar 2, 2026
Copilot finished work on behalf of msyyc March 2, 2026 07:27
@msyyc msyyc closed this Mar 2, 2026
@msyyc msyyc deleted the copilot/add-test-case-for-pull-3922 branch March 2, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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/3922

2 participants