Skip to content

[python] Add mock API tests for azure/special-headers/conditional-request (eTag custom wire name)#10536

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

[python] Add mock API tests for azure/special-headers/conditional-request (eTag custom wire name)#10536
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4336

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

Adds Python SDK Spector mock API tests for the azure/special-headers/conditional-request spec from Azure/typespec-azure#4336, which covers eTag with both standard (If-Match/If-None-Match) and non-standard custom wire names (x-ms-blob-if-match/x-ms-blob-if-none-match).

Changes

  • package.json: Bump @azure-tools/azure-http-specs 0.1.0-alpha.390.1.0-alpha.40-dev.10 to pull in the new spec
  • tests/mock_api/azure/test_azure_special_headers_conditional_request.py (new): Sync tests for all four scenarios
  • tests/mock_api/azure/asynctests/test_azure_special_headers_conditional_request_async.py (new): Async counterparts

Scenarios covered

Test Header sent
test_post_if_match If-Match: "valid" via MatchConditions.IfNotModified
test_post_if_none_match If-None-Match: "invalid" via MatchConditions.IfModified
test_post_custom_if_match x-ms-blob-if-match: "valid" (raw quoted string)
test_post_custom_if_none_match x-ms-blob-if-none-match: "invalid" (raw quoted string)

The custom-header cases use raw quoted strings ('"valid"') since standard MatchConditions handling is bypassed for non-standard header names.

@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 28, 2026
Copilot AI changed the title [WIP] Add test case for pull request 4336 [python] Add mock API tests for azure/special-headers/conditional-request (eTag custom wire name) Apr 28, 2026
Copilot AI requested a review from msyyc April 28, 2026 23:12
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/Azure/typespec-azure/pull/4336

2 participants