def test_load_keys_uri(): issuer = KeyIssuer(httpc_params={"verify": True}) url = "http://localhost/jwks.json" with responses.RequestsMock() as rsps: rsps.add(method="GET", url=url, json=JWK2, status=200) issuer.load_keys(jwks_uri=url) kb = issuer.find(url) assert len(kb) == 1 assert kb[0].source == url
def test_load_keys(): issuer = KeyIssuer(httpc_params={"verify": True}) issuer.load_keys(jwks=JWK2) items = issuer.items() assert len(items[None][0].keys()) == 4