def views(self, map_config, redis, session):
     request = DummyRequest()
     with testing.testConfig(request=request) as config:
         config.include('pyramid_chameleon')
         setattr(request, 'db_session', session)
         setattr(request.registry, 'redis_client', redis)
         yield ContentViews(request)
Exemplo n.º 2
0
def views(redis, session):
    request = DummyRequest()
    with testing.testConfig(request=request) as config:
        config.include("pyramid_chameleon")
        setattr(request, "db_session", session)
        setattr(request.registry, "redis_client", redis)
        yield ContentViews(request)
Exemplo n.º 3
0
 def _make_view(self, request):
     from ichnaea.content.views import ContentViews
     return ContentViews(request)
Exemplo n.º 4
0
 def _make_view(self):
     request = DummyRequest()
     setattr(request, 'db_ro_session', None)
     setattr(request.registry, 'redis_client', None)
     return ContentViews(request)
Exemplo n.º 5
0
 def _make_view(self, request):
     return ContentViews(request)