Exemple #1
0
    def test_it_configures_pyramid_sentry_plugin(self, config):
        create_app(None)

        config.add_settings.assert_any_call({
            "h_pyramid_sentry.filters":
            SENTRY_FILTERS,
            "h_pyramid_sentry.celery_support":
            True,
        })
Exemple #2
0
    def test_it_respects_the_kill_switch(self, config):
        create_app(None)

        config.add_settings.assert_not_called()
        config.add_tween.assert_not_called()
        config.set_authentication_policy.assert_not_called()
        config.add_route.assert_not_called()

        config.scan.assert_called_once_with("h.streamer.kill_switch_views")
Exemple #3
0
    def registry(self):
        settings = {
            "es.url": ELASTICSEARCH_URL,
            "es.index": ELASTICSEARCH_INDEX,
            "h.app_url": "http://example.com",
            "h.authority": "example.com",
            "secret_key": "notasecret",
            "sqlalchemy.url": "postgresql://postgres@localhost/htest",
        }

        return create_app(None, **settings).registry