def test_repr(): kj = KeyJar() kj['Alice'] = [KeyBundle(JWK0['keys'])] kj['Bob'] = [KeyBundle(JWK1['keys'])] kj['C'] = [KeyBundle(JWK2['keys'])] txt = kj.__repr__() assert "<KeyJar(issuers=[" in txt _d = eval(txt[16:-2]) assert set(_d) == {'Alice', 'Bob', 'C'}
def test_repr(): kj = KeyJar() kj.add_kb("Alice", KeyBundle(JWK0["keys"])) kj.add_kb("Bob", KeyBundle(JWK1["keys"])) kj.add_kb("C", KeyBundle(JWK2["keys"])) txt = kj.__repr__() assert "<KeyJar(issuers=[" in txt _d = eval(txt[16:-2]) assert set(_d) == {"Alice", "Bob", "C"}