MCPcopy Create free account
hub / github.com/authlib/authlib / test_encode_sensitive_data

Function test_encode_sensitive_data

tests/jose/test_jwt.py:186–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184
185
186def test_encode_sensitive_data():
187 # check=False won't raise error
188 jwt.encode({"alg": "HS256"}, {"password": ""}, "k", check=False)
189 with pytest.raises(errors.InsecureClaimError):
190 jwt.encode(
191 {"alg": "HS256"},
192 {"password": ""},
193 "k",
194 )
195 with pytest.raises(errors.InsecureClaimError):
196 jwt.encode(
197 {"alg": "HS256"},
198 {"text": "4242424242424242"},
199 "k",
200 )
201
202
203def test_encode_datetime():

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected