Skip to content

Commit

Permalink
test(aud): Explicitly pass None instead of default_audiences
Browse files Browse the repository at this point in the history
* because default_audience may change to not None in future
* and because this better reflects the intention of the test
  • Loading branch information
vpsx committed Oct 9, 2020
1 parent 30d702d commit 8863586
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def test_unexpected_aud_rejected(
token_headers,
rsa_private_key,
rsa_public_key,
default_audiences,
default_scopes,
iss,
):
Expand All @@ -94,9 +93,7 @@ def test_unexpected_aud_rejected(
claims, headers=token_headers, key=rsa_private_key, algorithm="RS256"
)
with pytest.raises(JWTAudienceError):
validate_jwt(
encoded_token, rsa_public_key, default_audiences, default_scopes, [iss]
)
validate_jwt(encoded_token, rsa_public_key, None, default_scopes, [iss])


def test_valid_aud_accepted(
Expand Down

0 comments on commit 8863586

Please sign in to comment.