Skip to content

Commit 21eed7e

Browse files
committed
Fix auth0_server_python package tests
1 parent 59d512e commit 21eed7e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/auth0_server_python/examples/RetrievingData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ access_token_for_google = await server_client.get_access_token_for_connection(co
8888

8989
The SDK will cache the token internally, and return it from the cache when not expired. When no token is found in the cache, or the token is expired, calling `get_access_token_for_connection()` will call Auth0 to retrieve a new token and update the cache.
9090

91-
In order to do this, the SDK needs access to a Refresh Token. By default, the SDK is configured to request the `offline_access` scope. If you override the scopes, ensure to always include `offline_access` if you want to be able to retrieve and refresh an access token for a connection.
91+
In order to do this, the SDK needs access to a Refresh Token. So ensure to always include `offline_access` if you want to be able to retrieve and refresh an access token for a connection.
9292

9393
### Passing Store Options
9494

packages/auth0_server_python/tests/test_server_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
from auth_server.server_client import ServerClient
9-
from error import MissingRequiredArgumentError, ApiError, MissingTransactionError, StartLinkUserError, AccessTokenError, AccessTokenForConnectionError,BackchannelLogoutError
9+
from auth0_server_python.error import MissingRequiredArgumentError, ApiError, MissingTransactionError, StartLinkUserError, AccessTokenError, AccessTokenForConnectionError,BackchannelLogoutError
1010
from auth_types import LogoutOptions, TransactionData
1111

1212

@@ -554,7 +554,7 @@ async def test_build_link_user_url_success(mocker):
554554
assert queries["id_token_hint"] == ["<id_token>"]
555555
assert queries["requested_connection"] == ["<connection>"]
556556
assert queries["requested_connection_scope"] == ["<scope>"]
557-
assert queries["scope"] == ["openid link_account offline_access"]
557+
assert queries["scope"] == ["openid link_account"]
558558
assert queries["state"] == ["xyz_state"]
559559

560560

@@ -596,7 +596,7 @@ async def test_build_link_user_url_fallback_authorize(mocker):
596596
# Just a quick check for e.g. "client_id" or "scope"
597597
assert queries["client_id"] == ["<client_id>"]
598598
assert queries["requested_connection_scope"] == ["<scope>"]
599-
assert queries["scope"] == ["openid link_account offline_access"]
599+
assert queries["scope"] == ["openid link_account"]
600600

601601
@pytest.mark.asyncio
602602
async def test_build_unlink_user_url_success(mocker):
@@ -628,7 +628,7 @@ async def test_build_unlink_user_url_success(mocker):
628628
assert parsed.path == "/authorize"
629629
assert queries["client_id"] == ["<client_id>"]
630630
assert queries["redirect_uri"] == ["/test_redirect_uri"]
631-
assert queries["scope"] == ["openid link_account offline_access"]
631+
assert queries["scope"] == ["openid link_account"]
632632
assert queries["code_challenge_method"] == ["S256"]
633633
assert queries["id_token_hint"] == ["<id_token>"]
634634
assert queries["requested_connection"] == ["<connection>"]
@@ -658,7 +658,7 @@ async def test_build_unlink_user_url_fallback_authorize(mocker):
658658
assert parsed.path == "/authorize"
659659

660660
queries = parse_qs(parsed.query)
661-
assert queries["scope"] == ["openid unlink_account offline_access"]
661+
assert queries["scope"] == ["openid unlink_account"]
662662

663663

664664
@pytest.mark.asyncio
@@ -706,7 +706,7 @@ async def test_build_unlink_user_url_success(mocker):
706706
# Check the main query parameters
707707
assert queries["client_id"] == ["<client_id>"]
708708
assert queries["redirect_uri"] == ["/test_redirect_uri"]
709-
assert queries["scope"] == ["openid unlink_account offline_access"]
709+
assert queries["scope"] == ["openid unlink_account"]
710710
assert queries["response_type"] == ["code"]
711711
assert "code_challenge" in queries
712712
assert queries["code_challenge_method"] == ["S256"]
@@ -743,7 +743,7 @@ async def test_build_unlink_user_url_no_authorization_endpoint(mocker):
743743
assert parsed.path == "/authorize"
744744

745745
queries = parse_qs(parsed.query)
746-
assert queries["scope"] == ["openid unlink_account offline_access"]
746+
assert queries["scope"] == ["openid unlink_account"]
747747

748748

749749
@pytest.mark.asyncio

0 commit comments

Comments
 (0)