@@ -91,7 +91,7 @@ def oauth_client_info():
9191def oauth_token ():
9292 return OAuthToken (
9393 access_token = "test_access_token" ,
94- token_type = "bearer " ,
94+ token_type = "Bearer " ,
9595 expires_in = 3600 ,
9696 refresh_token = "test_refresh_token" ,
9797 scope = "read write" ,
@@ -374,7 +374,7 @@ async def test_has_valid_token_expired(self, oauth_provider, oauth_token):
374374 @pytest .mark .anyio
375375 async def test_validate_token_scopes_no_scope (self , oauth_provider ):
376376 """Test scope validation with no scope returned."""
377- token = OAuthToken (access_token = "test" , token_type = "bearer " )
377+ token = OAuthToken (access_token = "test" , token_type = "Bearer " )
378378
379379 # Should not raise exception
380380 await oauth_provider ._validate_token_scopes (token )
@@ -385,7 +385,7 @@ async def test_validate_token_scopes_valid(self, oauth_provider, client_metadata
385385 oauth_provider .client_metadata = client_metadata
386386 token = OAuthToken (
387387 access_token = "test" ,
388- token_type = "bearer " ,
388+ token_type = "Bearer " ,
389389 scope = "read write" ,
390390 )
391391
@@ -398,7 +398,7 @@ async def test_validate_token_scopes_subset(self, oauth_provider, client_metadat
398398 oauth_provider .client_metadata = client_metadata
399399 token = OAuthToken (
400400 access_token = "test" ,
401- token_type = "bearer " ,
401+ token_type = "Bearer " ,
402402 scope = "read" ,
403403 )
404404
@@ -413,7 +413,7 @@ async def test_validate_token_scopes_unauthorized(
413413 oauth_provider .client_metadata = client_metadata
414414 token = OAuthToken (
415415 access_token = "test" ,
416- token_type = "bearer " ,
416+ token_type = "Bearer " ,
417417 scope = "read write admin" , # Includes unauthorized "admin"
418418 )
419419
@@ -427,7 +427,7 @@ async def test_validate_token_scopes_no_requested(self, oauth_provider):
427427 oauth_provider .client_metadata .scope = None
428428 token = OAuthToken (
429429 access_token = "test" ,
430- token_type = "bearer " ,
430+ token_type = "Bearer " ,
431431 scope = "admin super" ,
432432 )
433433
@@ -534,7 +534,7 @@ async def test_refresh_access_token_success(
534534
535535 new_token = OAuthToken (
536536 access_token = "new_access_token" ,
537- token_type = "bearer " ,
537+ token_type = "Bearer " ,
538538 expires_in = 3600 ,
539539 refresh_token = "new_refresh_token" ,
540540 scope = "read write" ,
@@ -567,7 +567,7 @@ async def test_refresh_access_token_no_refresh_token(self, oauth_provider):
567567 """Test token refresh with no refresh token."""
568568 oauth_provider ._current_tokens = OAuthToken (
569569 access_token = "test" ,
570- token_type = "bearer " ,
570+ token_type = "Bearer " ,
571571 # No refresh_token
572572 )
573573
0 commit comments