Repository navigation
[python] add mock API tests for Azure.SpecialHeaders.ConditionalRequest - #10783
Merged
Merged
Conversation
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.SpecialHeaders.ConditionalRequest
May 25, 2026
Yuchao Yan (msyyc)
marked this pull request as ready for review
May 25, 2026 07:13
|
You can try these changes here
|
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
Yuchao Yan (msyyc)
approved these changes
May 25, 2026
Yuchao Yan (msyyc)
enabled auto-merge
May 25, 2026 09:10
Chenxi Jiang (ChenxiJiang333)
approved these changes
May 25, 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 mock API test coverage for the
Azure.SpecialHeaders.ConditionalRequestSpector scenarios introduced in Azure/typespec-azure#4336, which exerciseAzure.Core.eTagheaders with both the standard names (If-Match,If-None-Match) and non-standard wire names (x-ms-blob-if-match,x-ms-blob-if-none-match).Changes
tests/mock_api/azure/test_azure_special_headers_conditional_request.py: coverspost_if_match,post_if_none_match,post_custom_if_match,post_custom_if_none_matchagainst the generatedConditionalRequestClient.tests/mock_api/azure/asynctests/.@typespec/http-client-python.The scenarios are already shipped in the pinned
@azure-tools/azure-http-specs@0.1.0-alpha.40, so no dependency bump is required.Example
The tests drive the generated client via
azure.core.MatchConditions, which the generatedprep_if_match/prep_if_none_matchhelpers map onto the appropriate (standard or custom) header: