Skip to content

test(python): cover body-or-no-content responses - #11722

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

test(python): cover body-or-no-content responses#11722
Yuchao Yan (msyyc) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-test-case-for-pull-11677

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Adds Python SDK mock API coverage for Spector operations that return either a 200 model body or 204 no-content success response.

  • Mock API coverage
    • Add shared sync and async tests for response/body-or-no-content.
    • Validate body deserialization, None for 204, raw status codes, and x-ms-request-id headers.
body, response = client.get_no_content(cls=lambda x, y, z: (y, x))

assert body is None
assert response.http_response.status_code == 204
  • Spector dependency

    • Update @typespec/http-specs to the prerelease containing the scenario.
  • Changelog

    • Add an internal entry for @typespec/http-client-python.

@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 pull request 11677 test(python): cover body-or-no-content responses Aug 19, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Sep 3, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Hi @Copilot. Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 additional days, the PR will automatically be closed. If you want to refresh the PR, please remove the stale label.

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 stale Mark a PR that hasn't been recently updated and will be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/microsoft/typespec/pull/11677

2 participants