[python] Add mock API tests for azure/special-headers/conditional-request (eTag custom wire name)#10536
Draft
[python] Add mock API tests for azure/special-headers/conditional-request (eTag custom wire name)#10536
Conversation
…g custom wire name) Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/0d6f9164-1a17-4525-b934-273ccf462470 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Python SDK Spector mock API tests for the
azure/special-headers/conditional-requestspec from Azure/typespec-azure#4336, which coverseTagwith 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-specs0.1.0-alpha.39→0.1.0-alpha.40-dev.10to pull in the new spectests/mock_api/azure/test_azure_special_headers_conditional_request.py(new): Sync tests for all four scenariostests/mock_api/azure/asynctests/test_azure_special_headers_conditional_request_async.py(new): Async counterpartsScenarios covered
test_post_if_matchIf-Match: "valid"viaMatchConditions.IfNotModifiedtest_post_if_none_matchIf-None-Match: "invalid"viaMatchConditions.IfModifiedtest_post_custom_if_matchx-ms-blob-if-match: "valid"(raw quoted string)test_post_custom_if_none_matchx-ms-blob-if-none-match: "invalid"(raw quoted string)The custom-header cases use raw quoted strings (
'"valid"') since standardMatchConditionshandling is bypassed for non-standard header names.