From 3db414cb97072967e8d4e7b7060e1002445c9e43 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 26 Jun 2024 23:16:02 +0200 Subject: [PATCH] fix tests broken in c09adffb64755736797bd176121a913e69ef0d7b --- umap/tests/test_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umap/tests/test_views.py b/umap/tests/test_views.py index b180d315..c693cdd2 100644 --- a/umap/tests/test_views.py +++ b/umap/tests/test_views.py @@ -122,7 +122,7 @@ def test_valid_proxy_request_with_invalid_ttl(client): def test_invalid_proxy_url_should_return_400(client): url = reverse("ajax-proxy") - params = {"url": "http://example.org/a space is invalid"} + params = {"url": "http://example.org/a\ncarriage\r\nreturn is invalid"} headers = { "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", "HTTP_REFERER": settings.SITE_URL, @@ -144,7 +144,7 @@ def test_valid_proxy_request_with_x_accel_redirect(client, settings): assert "X-Accel-Redirect" in response.headers assert ( response["X-Accel-Redirect"] - == "/proxy/http%3A//example.org%3Ffoo%3Dbar%26bar%3Dfoo" + == "/proxy/http%3A%2F%2Fexample.org%3Ffoo%3Dbar%26bar%3Dfoo" ) assert "X-Accel-Expires" in response.headers assert response["X-Accel-Expires"] == "300"