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
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/microsoft/typespec/pull/11677

2 participants