Skip to content

[python] Add mock API coverage for azure client-generator-core alternate-type scenario#10659

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-test-case-for-pull-4408
Draft

[python] Add mock API coverage for azure client-generator-core alternate-type scenario#10659
Copilot wants to merge 4 commits into
mainfrom
copilot/add-test-case-for-pull-4408

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

This adds missing Python mock API coverage requested for the Spector changes from Azure/typespec-azure PR #4408, focused on the azure/client-generator-core/alternate-type scenario.
Coverage is now present in both sync and async test suites for the generated Azure flavor client.

  • Added sync mock API tests (azure flavor)

    • New file: packages/http-client-python/tests/mock_api/azure/test_azure_client_generator_core_alternate_type.py
    • Covers:
      • external_type.get_model()
      • external_type.put_model(...)
      • external_type.get_property()
      • external_type.put_property(...)
  • Added async mock API tests (azure flavor)

    • New file: packages/http-client-python/tests/mock_api/azure/asynctests/test_azure_client_generator_core_alternate_type_async.py
    • Mirrors sync coverage for the corresponding async client surface.
  • Changelog

    • Added internal Chronus entry for @typespec/http-client-python.
FEATURE = geojson.Feature(
    geometry=geojson.Point((-122.25, 37.87)),
    properties={"name": "A single point of interest", "category": "landmark", "elevation": 100},
    id="feature-1",
)

result = client.external_type.get_model()
assert result == FEATURE

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Azure/typespec-azure/pulls/4408/files
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@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 May 12, 2026
Copilot AI changed the title [WIP] Add test case for pull request 4408 [python] Add mock API coverage for azure client-generator-core alternate-type scenario May 12, 2026
Copilot AI requested a review from msyyc May 12, 2026 23:16
Copilot finished work on behalf of msyyc May 12, 2026 23:16
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 14, 2026

Open in StackBlitz

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

commit: b0c8778

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

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

Add sync and async mock API tests for the azure/client-generator-core/alternate-type Spector scenario

@msyyc msyyc closed this May 14, 2026
@msyyc msyyc reopened this May 14, 2026
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/4408

2 participants