def test_get_non_existing_trust_domain(): jwt_bundle = JwtBundle(trust_domain_1, authorities) jwt_bundle_set = JwtBundleSet({trust_domain_1: jwt_bundle}) res = jwt_bundle_set.get(trust_domain_2) assert res is None
def test_get(): jwt_bundle = JwtBundle(trust_domain_1, authorities) jwt_bundle_set = JwtBundleSet({trust_domain_1: jwt_bundle}) res = jwt_bundle_set.get(trust_domain_1) assert res == jwt_bundle assert res.trust_domain() == jwt_bundle.trust_domain()
def test_get_empty_set(): jwt_bundle_set = JwtBundleSet({}) res = jwt_bundle_set.get(trust_domain_1) assert res is None