Page MenuHomeSoftware Heritage

Jenkins > / Python tests / test_save_origin_webhooks_deactivate


Run At
Oct 31 2022, 5:28 PM
client = <django.test.client.Client object at 0x7fdf1a844b70> staff_user = <User: admin> origin = {'archives': ['', ''], 'id': b'MZ\xc0H_lE[d\xcc\x...s://', 'description': 'Line numbering plugin for Highlight.js'}, 'type': 'git', ...} django_settings = <swh.web.tests.conftest.SwhSettingsWrapper object at 0x7fdf1a844f98> @pytest.mark.django_db def test_save_origin_webhooks_deactivate(client, staff_user, origin, django_settings): """Check forge webhook receivers feature is deactivated when the save_origin_webhooks application is not in installed apps.""" django_settings.SWH_DJANGO_APPS = [ app for app in django_settings.SWH_DJANGO_APPS if app != "swh.web.save_origin_webhooks" ] save_origin_webhooks_view_names = set( f"api-1-origin-save-webhook-{forge_type}" for forge_type in ("bitbucket", "gitea", "github", "gitlab", "sourceforge") ) all_view_names = set(get_resolver().reverse_dict.keys()) > assert save_origin_webhooks_view_names & all_view_names == set() E AssertionError: assert {'api-1-origi...-sourceforge'} == set() E Extra items in the left set: E 'api-1-origin-save-webhook-gitlab' E 'api-1-origin-save-webhook-bitbucket' E 'api-1-origin-save-webhook-github' E 'api-1-origin-save-webhook-gitea' E 'api-1-origin-save-webhook-sourceforge' E Full diff:... E E ...Full output truncated (10 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/web/tests/save_origin_webhooks/ AssertionError