def test_passes_overrides_parsed_from_get_params(self, pyramid_request): pyramid_request.GET['something-else'] = '' pyramid_request.GET['__feature__[foo]'] = '' pyramid_request.GET['__feature__[bar]'] = '' svc = feature_service_factory(None, pyramid_request) assert sorted(svc.overrides) == sorted(['foo', 'bar'])
def test_passes_overrides_parsed_from_get_params(self, pyramid_request): pyramid_request.GET["something-else"] = "" pyramid_request.GET["__feature__[foo]"] = "" pyramid_request.GET["__feature__[bar]"] = "" svc = feature_service_factory(None, pyramid_request) assert sorted(svc.overrides) == sorted(["foo", "bar"])
def test_passes_overrides_parsed_from_get_params(self, pyramid_request): pyramid_request.GET["something-else"] = "" pyramid_request.GET["__feature__[foo]"] = "" pyramid_request.GET["__feature__[bar]"] = "" svc = feature_service_factory(None, pyramid_request) assert sorted(svc.overrides) == sorted(["foo", "bar"])
def test_passes_overrides_parsed_from_get_params(self, pyramid_request): pyramid_request.GET['something-else'] = '' pyramid_request.GET['__feature__[foo]'] = '' pyramid_request.GET['__feature__[bar]'] = '' svc = feature_service_factory(None, pyramid_request) assert sorted(svc.overrides) == sorted(['foo', 'bar'])
def feature_service(self, pyramid_config, pyramid_request): svc = mock.Mock(spec_set=feature_service_factory(None, pyramid_request)) pyramid_config.register_service(svc, name="feature") return svc
def test_passes_session(self, pyramid_request): svc = feature_service_factory(None, pyramid_request) assert svc.session is pyramid_request.db
def feature_service(self, pyramid_config, pyramid_request): svc = mock.Mock(spec_set=feature_service_factory(None, pyramid_request)) pyramid_config.register_service(svc, name='feature') return svc
def test_passes_session(self, pyramid_request): svc = feature_service_factory(None, pyramid_request) assert svc.session is pyramid_request.db