Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/misc/test_origin_save.py
Show All 9 Lines | |||||
from swh.auth.django.utils import oidc_user_from_profile | from swh.auth.django.utils import oidc_user_from_profile | ||||
from swh.web.auth.utils import SWH_AMBASSADOR_PERMISSION | from swh.web.auth.utils import SWH_AMBASSADOR_PERMISSION | ||||
from swh.web.common.models import SaveOriginRequest | from swh.web.common.models import SaveOriginRequest | ||||
from swh.web.common.origin_save import SAVE_REQUEST_ACCEPTED, SAVE_TASK_SUCCEEDED | from swh.web.common.origin_save import SAVE_REQUEST_ACCEPTED, SAVE_TASK_SUCCEEDED | ||||
from swh.web.common.utils import reverse | from swh.web.common.utils import reverse | ||||
from swh.web.tests.utils import check_http_get_response | from swh.web.tests.utils import check_http_get_response | ||||
VISIT_TYPES = ("git", "svn", "hg") | VISIT_TYPES = ("git", "svn", "hg", "cvs") | ||||
PRIVILEGED_VISIT_TYPES = tuple(list(VISIT_TYPES) + ["archives"]) | PRIVILEGED_VISIT_TYPES = tuple(list(VISIT_TYPES) + ["archives"]) | ||||
def test_old_save_url_redirection(client): | def test_old_save_url_redirection(client): | ||||
url = reverse("browse-origin-save") | url = reverse("browse-origin-save") | ||||
redirect_url = reverse("origin-save") | redirect_url = reverse("origin-save") | ||||
resp = check_http_get_response(client, url, status_code=302) | resp = check_http_get_response(client, url, status_code=302) | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |