strip static url trailing slash at assignment

This commit is contained in:
David Lord 2019-05-25 11:14:49 -07:00
parent a12bf290da
commit ed9ab2d3b6
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 21 additions and 19 deletions

View file

@ -1427,14 +1427,14 @@ def test_static_url_path_with_ending_slash():
assert flask.url_for("static", filename="index.html") == "/foo/index.html"
def test_static_url_null_path(app):
def test_static_url_empty_path(app):
app = flask.Flask(__name__, static_folder='', static_url_path='')
rv = app.test_client().open('/static/index.html', method='GET')
assert rv.status_code == 200
rv.close()
def test_static_url_null_path_defaulting(app):
def test_static_url_empty_path_default(app):
app = flask.Flask(__name__, static_folder='')
rv = app.test_client().open('/static/index.html', method='GET')
assert rv.status_code == 200