forked from orbit-oss/flask
Merge remote-tracking branch 'origin/1.0-maintenance'
This commit is contained in:
commit
a74864ec22
5 changed files with 39 additions and 4 deletions
|
|
@ -680,6 +680,8 @@ class TestSendfile(object):
|
|||
(u'Ñandú/pingüino.txt', '"Nandu/pinguino.txt"',
|
||||
'%C3%91and%C3%BA%EF%BC%8Fping%C3%BCino.txt'),
|
||||
(u'Vögel.txt', 'Vogel.txt', 'V%C3%B6gel.txt'),
|
||||
# Native string not marked as Unicode on Python 2
|
||||
('tést.txt', 'test.txt', 't%C3%A9st.txt'),
|
||||
))
|
||||
def test_attachment_filename_encoding(self, filename, ascii, utf8):
|
||||
rv = flask.send_file('static/index.html', as_attachment=True, attachment_filename=filename)
|
||||
|
|
|
|||
|
|
@ -184,6 +184,10 @@ def test_default_error_handler():
|
|||
def forbidden():
|
||||
raise Forbidden()
|
||||
|
||||
@app.route("/slash/")
|
||||
def slash():
|
||||
return "slash"
|
||||
|
||||
app.register_blueprint(bp, url_prefix='/bp')
|
||||
|
||||
c = app.test_client()
|
||||
|
|
@ -191,5 +195,5 @@ def test_default_error_handler():
|
|||
assert c.get('/bp/forbidden').data == b'bp-forbidden'
|
||||
assert c.get('/undefined').data == b'default'
|
||||
assert c.get('/forbidden').data == b'forbidden'
|
||||
|
||||
|
||||
# Don't handle RequestRedirect raised when adding slash.
|
||||
assert c.get("/slash", follow_redirects=True).data == b"slash"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue