Skip to content

Add Python mock API tests for authentication/noauth/union Spector case - #9943

Merged
Yuchao Yan (msyyc) merged 3 commits into
mainfrom
copilot/add-python-test-case-noauth
Mar 6, 2026
Merged

Yuchao Yan (msyyc) merged 3 commits into
mainfrom
copilot/add-python-test-case-noauth

Conversation

Copilot AI commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds sync and async Python SDK tests for the authentication/noauth/union Spector scenario, which validates clients generated with NoAuth | OAuth2Auth union authentication.

  • Sync tests in generic_mock_api_tests/test_authentication.py:
    • test_noauth_union_valid_no_auth — unauthenticated request
    • test_noauth_union_valid_token — OAuth2 ****** request
  • Async tests in generic_mock_api_tests/asynctests/test_authentication_async.py: async counterparts of the above

Tests are placed in generic_mock_api_tests since both azure and unbranded flavors share the same import path (authentication.noauth.union.UnionClient).


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

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 Mar 6, 2026
Copilot AI changed the title [WIP] Add Python test case for noauth union Add Python mock API tests for authentication/noauth/union Spector case Mar 6, 2026
@msyyc
Yuchao Yan (msyyc) marked this pull request as ready for review March 6, 2026 02:55
@azure-sdk

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@pkg-pr-new

pkg-pr-new Bot commented Mar 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 5762a01

@github-actions

github-actions Bot commented Mar 6, 2026

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 tests for authentication/noauth/union Spector case (sync + async).

@msyyc
Yuchao Yan (msyyc) added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit 40416dc Mar 6, 2026
26 checks passed
@msyyc
Yuchao Yan (msyyc) deleted the copilot/add-python-test-case-noauth branch March 6, 2026 06:39
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.

4 participants