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