Repository navigation
[python] Add body-or-no-content Spector coverage - #12153
Conversation
|
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>
There was a problem hiding this comment.
🟢 Approval recommended
The tests accurately cover both Spector scenarios across Azure and unbranded clients, with a valid changelog entry.
0 open findings
What changed in this PR
Adds Python SDK Spector coverage for successful responses containing either a model body or no content.
Changes:
- Adds synchronous and asynchronous shared tests for HTTP 200 and 204 responses.
- Verifies deserialized values, status codes, and response headers.
- Adds an internal Python emitter changelog entry.
| File | Description |
|---|---|
packages/http-client-python/tests/mock_api/shared/test_response_body_or_no_content.py |
Adds synchronous response tests. |
packages/http-client-python/tests/mock_api/shared/asynctests/test_response_body_or_no_content_async.py |
Adds equivalent asynchronous tests. |
.chronus/changes/python-response-body-or-no-content-2026-10-12-3-14-0.md |
Records the internal test coverage update. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
You can try these changes here
|
|
For each test case, we could use "cls" to check response header. But for response body, I hope to check it without "cls" so that we could confirm whether generated sdk code work as expected. Copilot |
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Updated in 9811c2f: all sync and async cases assert |
commit: |
|
All changed packages have been documented.
Show changes
|
Python emitter diffBaseline No changes to generated output. Rendered diff: inline on the run summary, or the emitter-diff-html artifact. Informational check (eng/emitter-diff); does not block the PR. |
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Fixed in 1a261ab: added the generated |
Add Python SDK coverage for operations whose successful response is either a model body (HTTP 200) or no content (HTTP 204).
BlobLayout(content="hello")for 200 andNonefor 204.x-ms-request-idheaders for both responses.