Hsiaoming Yang
a7f1a21c12
Don't rely on X-Requested-With for pretty print json response ( #2193 )
...
* Don't rely on X-Requested-With for pretty print json response
* Fix test cases for pretty print json patch
* Fix gramma error in docs for pretty print json config
* Add changelog for JSONIFY_PRETTYPRINT_REGULAR
8 years ago
David Lord
42fbbb4cbb
add test and changelog for SERVER_NAME app.run default
...
ref #2152
8 years ago
Andrew Arendt
01b992b1a1
Added python3.6 support for tests
8 years ago
Armin Ronacher
9cd32cac32
Corrected after response for error handlers
...
Before this change after request functions were not correctly
invoked for error handlers.
8 years ago
Markus Unterwaditzer
c4ec6954e5
Don't passthrough_errors unless instructed. ( #2006 )
...
Fix #2005
Revert #1679 and #1996
8 years ago
Markus Unterwaditzer
098ea0c8ca
Only passthrough_errors if PROPAGATE_EXCEPTIONS
...
See pallets/werkzeug#954
8 years ago
dawran6
e048aa4e19
Add negative test for json.jsonify ( #1876 )
...
Test if jsonify function raises TypeError when both args and kwargs are
passed in.
Check the TypeError's message
9 years ago
Markus Unterwaditzer
6c359e0f53
Eliminate some resource warnings
9 years ago
Markus Unterwaditzer
d393597c50
Use recwarn everywhere
...
...instead of custom fixture. Also assert that no warnings are left over
after the test.
9 years ago
jphilipsen05
047efac537
Coverage for test_static_path_deprecated and test_static_url_path ( #1860 )
9 years ago
Steven Loria
2bf477cfea
Add JSONIFY_MIMETYPE configuration variable ( #1728 )
...
Allow jsonify responses' mimetype to be configured
9 years ago
Reuven
4dc2ef19ea
Use pytest.raises() instead of try/catch with asser 0
...
This is somehow more readable, and enable using the features of pytest's ExeptionInfo (such as errisinstance).
9 years ago
Miguel Grinberg
952a6c8989
Werkzeug should not block propagated exceptions from Flask
9 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
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
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
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
Paulo Bu
3f67fe94f1
Adds 2 tests for Flask.run method
10 years ago
Markus Unterwaditzer
a4931ff3a7
Kill class in test_basic
10 years ago
Markus Unterwaditzer
af4cb0ff2b
Remove flask superclass
10 years ago
Markus Unterwaditzer
af41dbe0c4
Remove useless classes
10 years ago
Markus Unterwaditzer
5da2c00419
Rewrite assertion methods
10 years ago
Markus Unterwaditzer
8fa5e32d9a
Tests pass now.
10 years ago
Markus Unterwaditzer
961db8ad72
Made tests recognizable
10 years ago
Markus Unterwaditzer
3550b26071
Move tests
10 years ago
Armin Ronacher
817b72d484
Removed deprecated module functionality
10 years ago
Armin Ronacher
84ad89ffa4
Always log now, even if debug is off.
10 years ago
Armin Ronacher
ddb5f9dc49
Fixed a broken test
11 years ago
Armin Ronacher
75f2af7a6a
Use a condition variable instead of sleeping
11 years ago
Alexis Svinartchouk
280d865960
fix issue #879 and add a test for it
...
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
11 years ago
Daniel Neuhäuser
52098e1e4f
Happy New Year 2014
11 years ago
Mikael Åhlén
dbc4096191
added a new test case with a Response instance and cleaned up the code
11 years ago
Mikael Åhlén
70f8b39c52
added a new behaviour for responses that enable the tuple to be in the form of (response, headers) and continiue to support the (response, status, headers) format.
11 years ago
Daniel Richman
3d67736e09
Check error handlers for specific classes first
...
This allows adding error handlers like this:
@app.errorhandler(werkzeug.exceptions.Forbidden)
And subclassing HTTPExceptions:
class ForbiddenBecauseReason(Forbidden): pass
@app.errorhandler(ForbiddenBecauseReason)
def error1(): return "Forbidden because reason", 403
@app.errorhandler(403)
def error2(): return "Forbidden", 403
... the idea being, that a flask extension might want to raise an
exception, with the default behaviour of creating a HTTP error page,
but still allowing the user to add a view/handler specific to that
exception (e.g., "Forbidden because you are not in the right group").
11 years ago
Markus Unterwaditzer
af5a0853bf
Fix #815
11 years ago
Armin Ronacher
3e4dbf93d9
Fixed a test that broke on 3.x
11 years ago
Armin Ronacher
d1d835c023
Added SESSION_REFRESH_EACH_REQUEST config option.
...
This also changes how sessions are being refreshed. With the new
behavior set-cookie is only emitted if the session is modified or if the
session is permanent. Permanent sessions can be set to not refresh
automatically through the SESSION_REFRESH_EACH_REQUEST config key.
This fixes #798 .
11 years ago
Serge S. Koval
44e39ab071
Fixed class-based views support
12 years ago
Armin Ronacher
58ad83f37c
Added support for bytes in sessions back
12 years ago
Armin Ronacher
c889fbc231
Changed interface for `flask.g`
...
This now makes it behave like it did before, it's just an object.
It did however gain ``__contains__`` and ``__iter__`` and I added
a ``get()`` method to fetch an attribute without raising an
error. This fixes #759 .
12 years ago
Armin Ronacher
93073489a0
Documented changes on the g object some more
12 years ago
Armin Ronacher
fd99abea57
Fixed too strict tests for cookie setting that broke on werkzeug changes
12 years ago
Armin Ronacher
56d3b74488
Added a test for non-ascii routing
12 years ago