Fixes for PEP451 import loaders and pytest 5.x
- pytest 5.x drops python2 compatibility and therefore only implements PEP 451 - pytest 5.x made the repr of `ExcInfo` less confusing (fixed tests depending on the old format)
This commit is contained in:
parent
b9c2267272
commit
a5ecdfa7a5
6 changed files with 57 additions and 25 deletions
|
|
@ -468,8 +468,8 @@ class TestSendfile(object):
|
|||
def test_send_file_object_without_mimetype(self, app, req_ctx):
|
||||
with pytest.raises(ValueError) as excinfo:
|
||||
flask.send_file(StringIO("LOL"))
|
||||
assert 'Unable to infer MIME-type' in str(excinfo)
|
||||
assert 'no filename is available' in str(excinfo)
|
||||
assert 'Unable to infer MIME-type' in str(excinfo.value)
|
||||
assert 'no filename is available' in str(excinfo.value)
|
||||
|
||||
flask.send_file(StringIO("LOL"), attachment_filename='filename')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue