def setUp(self): super(TestTrustMiddleware, self).setUp() self.context = utils.dummy_context() self.req = mock.Mock self.req.context = self.context self.middleware = trust.TrustMiddleware(None)
def trust_filter(app, conf, **local_conf): return trust.TrustMiddleware(app)