Ejemplo n.º 1
0
    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'])
Ejemplo n.º 2
0
    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"])
Ejemplo n.º 3
0
    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"])
Ejemplo n.º 4
0
    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'])
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
    def test_passes_session(self, pyramid_request):
        svc = feature_service_factory(None, pyramid_request)

        assert svc.session is pyramid_request.db
Ejemplo n.º 7
0
 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
Ejemplo n.º 8
0
    def test_passes_session(self, pyramid_request):
        svc = feature_service_factory(None, pyramid_request)

        assert svc.session is pyramid_request.db