client = <django.test.client.Client object at 0x7fdf1a844b70>
staff_user = <User: admin>
origin = {'archives': ['highlightjs-line-numbers.js.zip', 'highlightjs-line-numbers.js_visit2.zip'], 'id': b'MZ\xc0H_lE[d\xcc\x...s://doi.org/10.5063/schema/codemeta-2.0', '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/test_app.py:27: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Oct 31 2022, 5:28 PM