def test_authn_2():
    authn = Authn()
    target = "https://example.org/login"
    endpoint = "https://example.com/sso/redirect"
    authn.add(endpoint, AUTHNCTXT, target)

    assert target == authn.pick(endpoint, AUTHNCTXT)
def test_authn_1():
    accr = AuthnContextClassRef(text=PASSWORDPROTECTEDTRANSPORT)
    ac = AuthnContext(authn_context_class_ref=accr)
    authn = Authn()
    target = "https://example.org/login"
    endpoint = "https://example.com/sso/redirect"
    authn.add(endpoint, ac, target)

    assert target == authn.pick(endpoint, ac)