mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix tests broken in c09adffb64
This commit is contained in:
parent
c09adffb64
commit
3db414cb97
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ def test_valid_proxy_request_with_invalid_ttl(client):
|
||||||
|
|
||||||
def test_invalid_proxy_url_should_return_400(client):
|
def test_invalid_proxy_url_should_return_400(client):
|
||||||
url = reverse("ajax-proxy")
|
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 = {
|
headers = {
|
||||||
"HTTP_X_REQUESTED_WITH": "XMLHttpRequest",
|
"HTTP_X_REQUESTED_WITH": "XMLHttpRequest",
|
||||||
"HTTP_REFERER": settings.SITE_URL,
|
"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 "X-Accel-Redirect" in response.headers
|
||||||
assert (
|
assert (
|
||||||
response["X-Accel-Redirect"]
|
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 "X-Accel-Expires" in response.headers
|
||||||
assert response["X-Accel-Expires"] == "300"
|
assert response["X-Accel-Expires"] == "300"
|
||||||
|
|
Loading…
Reference in a new issue