diff --git a/swh/web/metrics/tests/test_app.py b/swh/web/metrics/tests/test_app.py index 7c40aae8..f4968b36 100644 --- a/swh/web/metrics/tests/test_app.py +++ b/swh/web/metrics/tests/test_app.py @@ -1,24 +1,24 @@ # Copyright (C) 2022 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information import pytest from django.urls import get_resolver from swh.web.metrics.urls import urlpatterns @pytest.mark.django_db -def test_mailmap_deactivate(client, mailmap_admin, django_settings): +def test_metrics_deactivate(django_settings): """Check metrics feature is deactivated when the swh.web.metrics django application is not in installed apps.""" django_settings.SWH_DJANGO_APPS = [ app for app in django_settings.SWH_DJANGO_APPS if app != "swh.web.metrics" ] metrics_view_names = set(urlpattern.name for urlpattern in urlpatterns) all_view_names = set(get_resolver().reverse_dict.keys()) assert metrics_view_names & all_view_names == set()