def build_real_request(wsgi_environ): """Build a Pyramid request, as if it was instantiated by Pyramid.""" config = testing.setUp(settings=DEFAULT_SETTINGS) includeme(config) request = pyramid_request.Request(wsgi_environ) request.registry = config.registry return request
def setUp(self): self.config = testing.setUp() self.request = request.Request({}) self.handler = mock.Mock() self.registry = None