def METHOD_NAME(self):
    identity1 = pretend.stub()
    identity2 = pretend.stub()
    context = pretend.stub()
    subpolicies = [
        pretend.stub(identity=lambda r: None),
        pretend.stub(
            identity=lambda r: identity1,
            permits=(
                lambda r, c, p: r.identity == identity1
                and c == context
                and p == "myperm"
            ),
        ),
        pretend.stub(identity=lambda r: identity2),
    ]
    policy = security_policy.MultiSecurityPolicy(subpolicies)
    request = pretend.stub(
        identity=identity1,
        add_finished_callback=lambda *a, **kw: None,
    )
    assert policy.permits(request, context, "myperm")