Skip to content

Add Spector mock API test for azure response-as-bool#10943

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pr-4328
Closed

Add Spector mock API test for azure response-as-bool#10943
Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pr-4328

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Adds Python SDK mock API test coverage for the azure/client-generator-core/response-as-bool Spector case (Azure/typespec-azure#4328), which adds a Python client namespace to the spec exercising the @responseAsBool decorator.

Changes

  • eng/scripts/ci/regenerate-common.ts: Removed azure/client-generator-core/response-as-bool from SKIP_SPECS so the spec is now regenerated for Python (the Python client namespace added in http-client-java, remove unused namer module #4328 unblocks generation).
  • tests/mock_api/azure/test_azure_client_generator_core_response_as_bool.py (+ async counterpart under asynctests/): New tests asserting the @responseAsBool HEAD operations map status to bool — 204 → True, 404 → False.
  • .chronus/changes: Internal changelog entry.
def test_exists(client: ResponseAsBoolClient):
    assert client.head_as_boolean.exists() is True      # HEAD /exists -> 204

def test_not_exists(client: ResponseAsBoolClient):
    assert client.head_as_boolean.not_exists() is False  # HEAD /exists/not-exists -> 404

The pinned @azure-tools/azure-http-specs@0.1.0-alpha.42-dev.0 already contains the Python namespace, so no dependency bump was required.

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@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 Jun 10, 2026
Copilot AI changed the title [WIP] Add test case for pull request 4328 Add Spector mock API test for azure response-as-bool Jun 10, 2026
Copilot finished work on behalf of msyyc June 10, 2026 05:40
Copilot AI requested a review from msyyc June 10, 2026 05:40
@msyyc msyyc marked this pull request as ready for review June 10, 2026 06:43
@pkg-pr-new

pkg-pr-new Bot commented Jun 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@10943

commit: 5b80ea6

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

Add mock api test for azure client-generator-core response-as-bool spector case

@msyyc

msyyc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

move to #10944

@msyyc msyyc closed this Jun 10, 2026
@msyyc msyyc deleted the copilot/add-test-case-for-pr-4328 branch June 10, 2026 07:16
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/4328

2 participants