Ejemplo n.º 1
0
def test_dumps():
    jb = JWKSBundle('iss')
    for iss, op in OPERATOR.items():
        jb[op.iss] = op.keyjar

    bs = jb.dumps()
    assert len(bs) > 2000
Ejemplo n.º 2
0
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()])