Move scope step-up test to top-level function (#2932)

This commit is contained in:
Marcelo Trylesinski 2026-06-20 18:45:10 +01:00 • committed by GitHub
commit 3169922492
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1447,10 +1447,11 @@ class TestAuthFlow:
except StopAsyncIteration:
pass # Expected
@pytest.mark.anyio
async def test_403_step_up_preserves_scope_from_stored_token(
self, oauth_provider: OAuthClientProvider, mock_storage: MockTokenStorage
):
@pytest.mark.anyio
async def test_403_step_up_preserves_scope_from_stored_token(
oauth_provider: OAuthClientProvider, mock_storage: MockTokenStorage
):
"""SEP-2350: a restart-loaded token's scope is folded into the step-up union.
On restart only the token is reloaded (not client_metadata.scope), so the stored token's