Alexander Pantyukhin
d53d5c732b
before_render_template signal
10 years ago
Markus Unterwaditzer
d13a1b363e
Rename jinja_env_class
...
Inspired by #1056
10 years ago
Joshua Carp
348bf52188
Handle empty deque on errorhandler lookup.
...
After registering a custom errorhandler by exception class, raising any
unhandled exception in a view function swallows the error and instead
throws an `IndexError` on trying to look up the appropriate handler.
This patch avoids the uninformative `IndexError` and preserves the
original exception by looping until the deque of classes is empty, not
forever.
10 years ago
Markus Unterwaditzer
0bac2ade91
Fix formatting errors
10 years ago
Phil Schaf
fd8e6b26f9
removed ExceptionHandlerDict
10 years ago
ThiefMaster
08ac3aa4e3
Allow custom jinja environments
...
This is useful e.g. when using the new Jinja Environment
attributes added in mitsuhiko/jinja2#404
10 years ago
Brandon Sandrowicz
20f62e828b
Fix Possible Typo
...
Looks like that was meant to be `config_key`. It works by accident because the function is defined in the same scope as the look that passes `config_key` to `apprunner`.
10 years ago
Markus Unterwaditzer
1577e1386e
Revert "Don't use threads in this test"
...
This reverts commit 78cd4161f0
.
10 years ago
Markus Unterwaditzer
78cd4161f0
Don't use threads in this test
...
I think test failures would've been ignored if there were some.
Fixes #1401
10 years ago
Martijn Pieters
ec0d208bc1
Switch away from using None as default value for the exception when tearing down a context.
...
When an exception has been handled when using the request / app context in a with statement, `sys.exc_info()` will still contain the exception information even though it has been handled already. The `__exit__` methods pass in `None` for the exception value in that case, which needs to be distinguisable from the default value for the `exc` parameter. Use a dedicated singleton sentinel value instead.
10 years ago
Markus Unterwaditzer
1aa8a54b17
Always run memory tests
10 years ago
Keyan Pishdadian
1cd9e91810
Changed error message to include actual exception contents
10 years ago
Keyan Pishdadian
d6a1307f9d
Change strings to bytes to support Python3, typo in function name
10 years ago
Keyan Pishdadian
294961e6fc
Change tests to support older response format
10 years ago
Keyan Pishdadian
39e66ca6d7
Add tests for adding exception to response contents only when DEBUG is True
10 years ago
Keyan Pishdadian
1479cf80f6
Move test file, add RedBaron to tox.ini
10 years ago
Keyan Pishdadian
b759aa2b95
Add test for naming module and fix logic to cover
10 years ago
Keyan Pishdadian
0cf5881312
Add tests, remove manual testing file #1135
10 years ago
Chris Rebert
6d2c076a3b
make test_request_preprocessing_early_return more thorough
10 years ago
Markus Unterwaditzer
1158e22958
Fix test under Python 3
10 years ago
Markus Unterwaditzer
5fa76f6800
Add testcase for behavior described in #1338
10 years ago
Ben Jones
61263e08f9
Add datetime.date support to JSONEncoder
10 years ago
Parkayun
33534bb4a9
Happy New Year 2015
10 years ago
Michael Hall
98b155c65d
Fixed #1288 : app.add_url_rule() should look for OPTIONS methods in a case-insensitive manner
10 years ago
Marc Abramowitz
d9402fc0c0
Make `jsonify` terminate responses with a newline
...
This came up in the context of
https://github.com/kennethreitz/httpbin/issues/168
10 years ago
Petr Zemek
ec3d5800f2
Put two spaces before inline comments when there is only one space.
...
PEP8 (E261) suggests to use at least two spaces before inline comments.
10 years ago
Petr Zemek
4840fc0edc
Change `== None` to `is None`.
...
PEP8 (E711) suggests that comparison to None should be `cond is None`.
10 years ago
Petr Zemek
e41bf1e181
Remove two redundant empty lines.
...
PEP8 suggests to use two empty lines to separate functions, not three.
10 years ago
defuz
f88765d504
set TEMPLATE_AUTO_RELOAD default value to None
10 years ago
defuz
5e8d503098
add tests for trim_namespace argument of app.config.get_namespace
10 years ago
Markus Unterwaditzer
bd232e5c82
PEP8
10 years ago
Gilman Callsen
d425279650
Improve compression by removing whitespace from separators when using jsonify() and JSONIFY_PRETTYPRINT_REGULAR is False.
...
Commit includes Changelog entry and two new tests in test_basic.py.
10 years ago
INADA Naoki
4d4a639ba4
Add test for deprecated flask.Request properties.
10 years ago
Davide Ceretti
93c190a8fd
Add unittest for appcontext_tearing_down signal
10 years ago
Markus Unterwaditzer
c6795eb626
Remove useless unittest imports
10 years ago
Paulo Bu
3f67fe94f1
Adds 2 tests for Flask.run method
10 years ago
Markus Unterwaditzer
192da325f8
Testsuite is not a package
10 years ago
Markus Unterwaditzer
56db3ddf4e
Remove useless imports
10 years ago
Markus Unterwaditzer
be42d5665e
Split instance tests off into own file
10 years ago
Markus Unterwaditzer
a4931ff3a7
Kill class in test_basic
10 years ago
Markus Unterwaditzer
71dae37733
Kill classes in test_regression
10 years ago
Markus Unterwaditzer
f8a778deae
Kill classes in test_testing
10 years ago
Markus Unterwaditzer
77d887526d
Rename fixture apps_tmpdir
10 years ago
Markus Unterwaditzer
a00ccdce94
Remove more test_apps
10 years ago
Markus Unterwaditzer
b88a837674
Remove fake extensions from test_apps
10 years ago
Markus Unterwaditzer
4ea4ea7f93
Remove old helper function
10 years ago
Markus Unterwaditzer
861aa0db1f
Init global test_apps explicitly
10 years ago
Markus Unterwaditzer
588cfa9c91
Add note to memleak tests
10 years ago
Markus Unterwaditzer
03339501ab
Remove obsolete apps
10 years ago
Markus Unterwaditzer
af4cb0ff2b
Remove flask superclass
10 years ago