Skip to content

Commit

Permalink
💩 Bad fix: if 404.html not found, returned url without / at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteApfel committed Oct 18, 2021
1 parent cc56d6d commit b564f1f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tests/test_staticfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,10 @@ def test_staticfiles_html_without_index(tmpdir, test_client_factory):
client = test_client_factory(app)

response = client.get("/dir/")
assert response.url == "http://testserver/dir/"
assert response.status_code == 404
assert response.text == "<h1>Custom not found page</h1>"

response = client.get("/dir")
assert response.url == "http://testserver/dir/"
assert response.status_code == 404
assert response.text == "<h1>Custom not found page</h1>"

Expand All @@ -298,12 +296,10 @@ def test_staticfiles_html_without_404(tmpdir, test_client_factory):
client = test_client_factory(app)

response = client.get("/dir/")
assert response.url == "http://testserver/dir/"
assert response.status_code == 200
assert response.text == "<h1>Hello</h1>"

response = client.get("/dir")
assert response.url == "http://testserver/dir/"
assert response.status_code == 200
assert response.text == "<h1>Hello</h1>"

Expand All @@ -321,7 +317,6 @@ def test_staticfiles_html_only_files(tmpdir, test_client_factory):
client = test_client_factory(app)

response = client.get("/dir")
assert response.url == "http://testserver/"
assert response.status_code == 404
assert response.text == "Not Found"

Expand Down

0 comments on commit b564f1f

Please sign in to comment.