David Lord
5d9dd0b379
set session accessed for setdefault
8 years ago
David Lord
f75ad9fca2
refactor session cookie domain logic
...
cache result of session cookie domain
add warnings for session cookie domain issues
add changelog
8 years ago
David Lord
697f7b9365
refactor make_response to be easier to follow
...
* be explicit about how tuples are unpacked
* allow bytes for status value
* allow Headers for headers value
* use TypeError instead of ValueError
* errors are more descriptive
* document that view must not return None
* update documentation about return values
* test more response types
* test error messages
closes #1676
8 years ago
David Lord
97e2cd0a5a
update changelog
...
move test next to existing test, rename
reword / reflow param doc
8 years ago
David Lord
e50767cfca
add test for build error special values
8 years ago
jab
00d6e339ec
Change Flask.__init__ to accept two new keyword arguments, host_matching and static_host. ( #1560 )
...
This enables host_matching to be set properly by the time the constructor adds
the static route, and enables the static route to be properly associated with
the required host.
Previously, you could only enable host_matching once your app was already
instantiated (e.g. app.url_map.host_matching = True), but at that point
the constructor would have already added the static route without host matching
and an associated host, leaving the static route in a broken state.
Fixes #1559 .
8 years ago
Markus Unterwaditzer
c935eaceaf
Revert "Handle BaseExceptions ( #2222 )"
...
This reverts commit 1d4448abe3
.
8 years ago
Diggory Blake
6f7847e3c4
Make test more idiomatic
8 years ago
Diggory Blake
d0e2e7b66c
Add test and changes
8 years ago
Diggory Blake
1d4448abe3
Handle BaseExceptions ( #2222 )
...
* Handle BaseExceptions
* Add test and changes
* Make test more idiomatic
8 years ago
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
Jimmy McCarthy
011b129b6b
Add kwarg to disable auto OPTIONS on add_url_rule
...
Adds support for a kwarg `provide_automatic_options` on `add_url_rule`, which
lets you turn off the automatic OPTIONS response on a per-URL basis even if
your view functions are functions, not classes (so you can't provide attrs
on them).
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
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
Mihir Singh
5935ee495c
Add tests for the `Vary: Cookie` header
11 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