Skip to content

Commit 3a8a3e0

Browse files
committed
chore: Removed py35 hack
1 parent bf49690 commit 3a8a3e0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/test_token_gen.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import datetime
1919
import json
2020
import os
21-
import sys
2221
import time
2322

2423
from google.auth import crypt
@@ -77,21 +76,13 @@ def _merge_jwt_claims(defaults, overrides):
7776
return defaults
7877

7978

80-
def _is_py_35():
81-
return sys.version_info.minor == 5
82-
83-
8479
def verify_custom_token(custom_token, expected_claims, tenant_id=None):
8580
assert isinstance(custom_token, bytes)
8681
expected_email = MOCK_SERVICE_ACCOUNT_EMAIL
8782
header = jwt.decode_header(custom_token)
8883
assert header.get('typ') == 'JWT'
8984
if _is_emulated():
90-
# Setting alg requires https://github.com/googleapis/google-auth-library-python/pull/729
91-
# which is only available in latest google-auth versions that's supported on Python 3.6
92-
# and up. Skip the test on Python 3.5 for now.
93-
if not _is_py_35():
94-
assert header.get('alg') == 'none'
85+
assert header.get('alg') == 'none'
9586
assert custom_token.split(b'.')[2] == b''
9687
expected_email = _token_gen.AUTH_EMULATOR_EMAIL
9788
token = jwt.decode(custom_token, verify=False)

0 commit comments

Comments
 (0)