Skip to content

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

Merged
msyyc merged 3 commits intomainfrom
copilot/add-python-test-case-noauth
Mar 6, 2026
Merged

Add Python mock API tests for authentication/noauth/union Spector case#9943
msyyc merged 3 commits intomainfrom
copilot/add-python-test-case-noauth

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

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
Copilot finished work on behalf of msyyc March 6, 2026 02:31
@msyyc msyyc marked this pull request as ready for review March 6, 2026 02:55
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@msyyc msyyc enabled auto-merge March 6, 2026 03:25
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 6, 2026

Open in StackBlitz

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

commit: 5762a01

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

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 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 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