Skip to content

Commit fd146d7

Browse files
Fix: Convert scopes set to list in Credentials.__init__
This change ensures that if a set of scopes is passed to Credentials, it is converted to a list. This prevents issues with JSON serialization (to_json failure) and ensures consistent mutability behavior for the scopes property. Also updated tests/test__oauth2client.py to handle the type change (set -> list) in equality checks. Fixes #1145
1 parent ba94c5f commit fd146d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test__oauth2client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test__convert_oauth2_credentials():
5656
assert new_credentials._client_id == old_credentials.client_id
5757
assert new_credentials._client_secret == old_credentials.client_secret
5858
assert new_credentials._token_uri == old_credentials.token_uri
59-
assert new_credentials.scopes == old_credentials.scopes
59+
assert set(new_credentials.scopes) == set(old_credentials.scopes)
6060

6161

6262
def test__convert_service_account_credentials():

0 commit comments

Comments
 (0)