def test_dump_load(): jb = JWKSBundle('iss') for iss, op in OPERATOR.items(): jb[op.iss] = op.keyjar bs = jb.dumps() receiver = JWKSBundle('') receiver.loads(bs) assert len(receiver.keys()) == 4 assert set(receiver.keys()) == set([op.iss for op in OPERATOR.values()])
def test_create(): jb = JWKSBundle('iss') for iss, op in OPERATOR.items(): jb[op.iss] = op.keyjar assert len(jb.keys()) == 4