Skip to content

Commit 73062e3

Browse files
test: update auth flow tests
1 parent d8eb7dc commit 73062e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/client/test_auth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ async def test_oauth_discovery_fallback_conditions(self, oauth_provider: OAuthCl
401401
# Send a successful token response
402402
token_response = httpx.Response(
403403
200,
404+
headers={"Content-Type": "application/json"},
404405
content=(
405406
b'{"access_token": "new_access_token", "token_type": "Bearer", "expires_in": 3600, '
406407
b'"refresh_token": "new_refresh_token"}'
@@ -790,9 +791,9 @@ async def test_auth_flow_with_no_tokens(self, oauth_provider: OAuthClientProvide
790791
# Send a successful token response
791792
token_response = httpx.Response(
792793
200,
794+
headers={"Content-Type": "application/x-www-form-urlencoded; charset=utf-8"},
793795
content=(
794-
b'{"access_token": "new_access_token", "token_type": "Bearer", "expires_in": 3600, '
795-
b'"refresh_token": "new_refresh_token"}'
796+
b"access_token=new_access_token&token_type=bearer&expires_in=3600&refresh_token=new_refresh_token"
796797
),
797798
request=token_request,
798799
)

0 commit comments

Comments
 (0)