|
|
@ -265,8 +265,11 @@ class SendfileTestCase(FlaskTestCase): |
|
|
|
# etags |
|
|
|
# etags |
|
|
|
self.assert_equal(len(captured), 1) |
|
|
|
self.assert_equal(len(captured), 1) |
|
|
|
with catch_warnings() as captured: |
|
|
|
with catch_warnings() as captured: |
|
|
|
class PyStringIO(StringIO): |
|
|
|
class PyStringIO(object): |
|
|
|
pass |
|
|
|
def __init__(self, *args, **kwargs): |
|
|
|
|
|
|
|
self._io = StringIO(*args, **kwargs) |
|
|
|
|
|
|
|
def __getattr__(self, name): |
|
|
|
|
|
|
|
return getattr(self._io, name) |
|
|
|
f = PyStringIO('Test') |
|
|
|
f = PyStringIO('Test') |
|
|
|
f.name = 'test.txt' |
|
|
|
f.name = 'test.txt' |
|
|
|
rv = flask.send_file(f) |
|
|
|
rv = flask.send_file(f) |
|
|
|