-
Notifications
You must be signed in to change notification settings - Fork 56
Add test coverage for ClaimsIdentity.get_token_scope method #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…g in ChannelServiceAdapter and RestChannelServiceClientFactory
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…//github.com/microsoft/Agents-for-python into users/mbarbour/updateProactiveScopeAuthFlows
|
@copilot run the python command black on the folder containing any files you modify, and accept those changes. |
Co-authored-by: MattB-msft <10568244+MattB-msft@users.noreply.github.com>
Co-authored-by: MattB-msft <10568244+MattB-msft@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive test coverage for the get_token_scope method in the ClaimsIdentity class. The tests cover both agent and non-agent claim scenarios, including various edge cases related to token versions, missing claims, and audience matching.
Changes:
- Added new test file
test_claims_identity.pywith 6 test cases covering theget_token_scopemethod - Tests cover agent claims (versions 1.0 and 2.0), non-agent claims, and edge cases (missing version, missing app_id, matching app_id and audience)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Successfully added comprehensive test coverage for the
get_token_scopemethod inClaimsIdentityclass. All 6 test cases pass, covering both agent and non-agent claim scenarios plus edge cases. Code review and security checks passed with no issues. Applied black formatting as requested.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.