Example #1
0
 def test_serializes_to_json(self):
     exc = InvalidJWTGrantTokenClaimError('iss')
     assert loads(exc.json) == {'error': 'invalid_grant',
                                'error_description': "Invalid claim 'iss' in grant token."}
Example #2
0
 def test_serializes_to_json(self):
     exc = InvalidJWTGrantTokenClaimError("iss")
     assert loads(exc.json) == {
         "error": "invalid_grant",
         "error_description": "Invalid claim 'iss' in grant token.",
     }
Example #3
0
 def test_sets_correct_description_without_claim_description(self):
     exc = InvalidJWTGrantTokenClaimError('iss')
     assert exc.description == "Invalid claim 'iss' in grant token."
Example #4
0
 def test_sets_correct_description_with_claim_description(self):
     exc = InvalidJWTGrantTokenClaimError("iss", "issuer")
     assert exc.description == "Invalid claim 'iss' (issuer) in grant token."