Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.admin.test_origin_save::Tests / Python tests / test_remove_authorized_origin_url
Failed

TEST RESULT

Run At
May 25 2022, 4:46 PM
Details
client = <django.test.client.Client object at 0x7f45e63c0080> staff_user = <User: admin> def test_remove_authorized_origin_url(client, staff_user): assert can_save_origin(_authorized_origin_url) == SAVE_REQUEST_ACCEPTED url = reverse( "admin-origin-save-remove-authorized-url", url_args={"origin_url": _authorized_origin_url}, ) > check_not_login(client, url) .tox/py3/lib/python3.7/site-packages/swh/web/tests/admin/test_origin_save.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/admin/test_origin_save.py:39: in check_not_login resp = check_http_post_response(client, url, status_code=302) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ client = <django.test.client.Client object at 0x7f45e63c0080> url = '/admin/origin/save/authorized_urls/remove/https://scm.ourproject.org/anonscm//' status_code = 302, content_type = '*/*' request_content_type = 'application/json', data = None, http_origin = None def check_http_post_response( client: Client, url: str, status_code: int, content_type: str = "*/*", request_content_type="application/json", data: Optional[Dict[str, Any]] = None, http_origin: Optional[str] = None, ) -> HttpResponse: """Helper function to check HTTP response for a POST request. Args: client: Django test client url: URL to check response status_code: expected HTTP status code content_type: expected response content type request_content_type: content type of request body data: optional POST data Returns: The HTTP response """ actual_response = client.post( url, data=data, content_type=request_content_type, HTTP_ACCEPT=content_type, HTTP_ORIGIN=http_origin, ) > assert isinstance(actual_response, Response) E assert False E + where False = isinstance(<HttpResponseRedirect status_code=302, "text/html; charset=utf-8", url="/admin/login/?next=/admin/origin/save/authorized_urls/remove/https%3A//scm.ourproject.org/anonscm//">, Response) .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:103: AssertionError