Skip to content
Snippets Groups Projects
Commit fbbf6e74 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

tests/gunicorn_config: Fix tests after recent changes in swh-core

Those tests were broken since rDCORE2255767b9763cefe0841a8d0231f568adcec87ff.
parent 42448248
No related branches found
No related tags found
1 merge request!61gunicorn_config: Fix tests after recent changes in swh-core
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from sentry_sdk.integrations.django import DjangoIntegration
from swh.core.api.gunicorn_config import * # noqa
from swh.core.api.gunicorn_config import post_fork as _post_fork
from swh.core.sentry import init_sentry
def post_fork(server, worker): # type: ignore
_post_fork(server, worker,
flask=False, sentry_integrations=[DjangoIntegration()])
def post_fork(server, worker):
init_sentry(sentry_dsn=None, integrations=[DjangoIntegration()])
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -28,6 +28,7 @@ def test_post_fork_with_dsn_env():
dsn='test_dsn',
integrations=[django_integration],
debug=False,
release=None,
)
......@@ -44,4 +45,5 @@ def test_post_fork_debug():
dsn='test_dsn',
integrations=[django_integration],
debug=True,
release=None,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment