Skip to content
Myr

Added a test for sending from directories

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 76e2f9c · Browse files · 1 file+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:flask/testsuite/helpers.py+10 added
366 unmodified lines
367 cc = parse_cache_control_header(rv.headers['Cache-Control'])368 self.assert_equal(cc.max_age, 10)369 rv.close()370371 def test_send_from_directory(self):372 app = flask.Flask(__name__)373 app.testing = True374 app.root_path = os.path.join(os.path.dirname(__file__),375 'test_apps', 'subdomaintestmodule')376 with app.test_request_context():377 rv = flask.send_from_directory('static', 'hello.txt')378 rv.direct_passthrough = False379 self.assert_equal(rv.get_data().strip(), b'Hello Subdomain')380381382class LoggingTestCase(FlaskTestCase):383384 def test_logger_cache(self):385 app = flask.Flask(__name__)
230 unmodified lines