Skip to content

feat(http-client-python): add mock API tests for payload/head scenario#10420

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-10194
Draft

feat(http-client-python): add mock API tests for payload/head scenario#10420
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-10194

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Adds Python SDK mock API tests for the payload/head Spector scenario introduced in #10194 — a HEAD operation returning Content-Type and x-ms-meta response headers with no body.

Changes

  • package.json — Bumps @typespec/http-specs to 0.1.0-alpha.37-dev.3 (first version containing the payload/head spec)
  • regenerate-common.ts — Adds payload/head entry so CI regenerates the client
  • mock_api/shared/test_payload_head.py + asynctests/test_payload_head_async.py — Sync and async tests placed in shared/ since both azure and unbranded flavors expose identical import paths and API surface
def test_content_type_header_in_response(client: HeadClient):
    assert client.content_type_header_in_response() is True

The scenario sends a HEAD request to /payload/head/content-type-header-in-response and expects a 200 response with Content-Type: text/plain; charset=utf-8 and x-ms-meta: hello headers.

@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 Apr 17, 2026
Copilot AI changed the title [WIP] Add test case for pull request 10194 feat(http-client-python): add mock API tests for payload/head scenario Apr 17, 2026
Copilot AI requested a review from msyyc April 17, 2026 23:00
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/10194

2 participants