def test_find():
    _path = full_path('jwk_private_key.json')
    kb = KeyBundle(source='file://{}'.format(_path))
    kj = KeyJar()
    kj.add_kb('Alice', kb)

    assert kj.find('{}'.format(_path), 'Alice')
    assert kj.find('https://example.com', 'Alice') is None
    assert kj.find('{}'.format(_path), 'Bob') is None
Пример #2
0
def test_find():
    _path = full_path("jwk_private_key.json")
    kb = KeyBundle(source="file://{}".format(_path))
    kj = KeyJar()
    kj.add_kb("Alice", kb)

    assert kj.find("{}".format(_path), "Alice")
    assert kj.find("https://example.com", "Alice") == []
    assert kj.find("{}".format(_path), "Bob") is None