David Lord
3d22b81edf
Merge branch 'master' into jrmccarthy-master
2017-04-21 07:03:46 -07:00
David Lord
a2acabcc3f
add test for build error special values
2017-04-20 08:52:37 -07:00
jab
8a2db3db18
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 .
2017-04-07 16:31:54 +02:00
Markus Unterwaditzer
6b38678139
Merge branch '0.12-maintenance'
2017-03-31 18:44:33 +02:00
Markus Unterwaditzer
247a0c906d
Revert "Handle BaseExceptions ( #2222 )"
...
This reverts commit 1d4448abe3 .
2017-03-31 18:44:14 +02:00
Diggory Blake
65cf64e019
Make test more idiomatic
2017-03-31 18:40:46 +02:00
Diggory Blake
965d444e0f
Add test and changes
2017-03-31 18:40:46 +02:00
Diggory Blake
2774221987
Handle BaseExceptions ( #2222 )
...
* Handle BaseExceptions
* Add test and changes
* Make test more idiomatic
2017-03-31 18:07:43 +02:00
Hsiaoming Yang
9c5f048ad2
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
2017-03-07 10:09:46 +09:00
David Lord
7af6c7fa97
add test and changelog for SERVER_NAME app.run default
...
ref #2152
2017-01-17 14:08:33 -08:00
Andrew Arendt
9f0db54689
Added python3.6 support for tests
2017-01-10 11:20:53 -06:00
Armin Ronacher
a7fbfb387f
Corrected after response for error handlers
...
Before this change after request functions were not correctly
invoked for error handlers.
2016-09-08 11:56:02 +03:00
Markus Unterwaditzer
ec9e9c2f6e
Don't passthrough_errors unless instructed. ( #2006 )
...
Fix #2005
Revert #1679 and #1996
2016-09-06 22:32:34 +02:00
Markus Unterwaditzer
2a5061282b
Only passthrough_errors if PROPAGATE_EXCEPTIONS
...
See pallets/werkzeug#954
2016-08-27 14:38:13 +02:00
dawran6
b110065f9c
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
2016-06-03 10:58:39 -07:00
Markus Unterwaditzer
0265d02b19
Eliminate some resource warnings
2016-06-03 14:29:27 +02:00
Markus Unterwaditzer
d6ffc570d2
Use recwarn everywhere
...
...instead of custom fixture. Also assert that no warnings are left over
after the test.
2016-06-03 13:59:47 +02:00
jphilipsen05
f85f17dad7
Coverage for test_static_path_deprecated and test_static_url_path ( #1860 )
2016-06-02 17:56:08 -07:00
Steven Loria
7d134e9556
Add JSONIFY_MIMETYPE configuration variable ( #1728 )
...
Allow jsonify responses' mimetype to be configured
2016-04-08 15:30:47 -07:00
Reuven
98581ec6d6
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).
2016-03-04 13:30:40 +02:00
Miguel Grinberg
2bbddf57f8
Werkzeug should not block propagated exceptions from Flask
2016-01-02 14:18:36 -08:00
Jimmy McCarthy
9ccdd2f796
Merge branch 'master' of github.com:mitsuhiko/flask
2015-09-14 13:06:54 -05:00
Markus Unterwaditzer
976db05a5b
Merge branch '0.10-maintenance'
2015-07-16 12:05:07 +02:00
Jimmy McCarthy
a3bbd155a3
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).
2015-07-07 13:20:53 -05:00
Brandon Sandrowicz
028525d2bf
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`.
2015-04-02 01:48:48 +02:00
Markus Unterwaditzer
89fd83a50c
Revert "Don't use threads in this test"
...
This reverts commit 78cd4161f0 .
2015-03-29 23:03:38 +02:00
Markus Unterwaditzer
42d9cb6363
Don't use threads in this test
...
I think test failures would've been ignored if there were some.
Fixes #1401
2015-03-29 13:40:35 +02:00
Chris Rebert
c16e7df2a1
make test_request_preprocessing_early_return more thorough
2015-02-06 13:11:23 -08:00
Markus Unterwaditzer
bf3f336306
Fix test under Python 3
2015-02-06 18:20:17 +01:00
Markus Unterwaditzer
d8642ab085
Add testcase for behavior described in #1338
2015-02-05 22:13:19 +01:00
Parkayun
e05771ff60
Happy New Year 2015
2015-01-02 11:35:00 +09:00
Michael Hall
ca45970012
Fixed #1288 : app.add_url_rule() should look for OPTIONS methods in a case-insensitive manner
2014-12-26 08:58:35 -05:00
Marc Abramowitz
8a022de2ed
Make jsonify terminate responses with a newline
...
This came up in the context of
https://github.com/kennethreitz/httpbin/issues/168
2014-12-07 14:37:26 -08:00
Markus Unterwaditzer
15e4d6f338
PEP8
2014-10-21 19:11:54 +02:00
Gilman Callsen
6f0c3533c7
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.
2014-10-21 19:11:06 +02:00
Paulo Bu
a096c04e62
Adds 2 tests for Flask.run method
2014-09-14 17:27:19 +02:00
Markus Unterwaditzer
91c1d1a5ca
Kill class in test_basic
2014-09-11 22:09:52 +02:00
Markus Unterwaditzer
1d0b83690e
Remove flask superclass
2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
304913a878
Remove useless classes
2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
879becff31
Rewrite assertion methods
2014-09-11 22:09:51 +02:00
Markus Unterwaditzer
1c40e7ad49
Tests pass now.
2014-09-11 22:09:50 +02:00
Markus Unterwaditzer
2ea00e48ad
Made tests recognizable
2014-09-11 22:09:50 +02:00