Commit graph

405 commits

Author SHA1 Message Date
Kiss György
eb6880c00a Added runner fixture 2016-06-25 13:24:43 +02:00
Kiss György
53444cfc8a Added tests, fixed some minor alignment problems. 2016-06-25 13:22:18 +02:00
Dave Barker
015fbbfa08 Remove unnecessary werkzeug mock attribs from test 2016-06-15 02:25:48 +01:00
Dave Barker
02d1f8a09d Add test for new template auto reload debug behaviour 2016-06-15 02:15:33 +01:00
RamiC
ba6e6a61cc Check for a request ctx before using the request.
Use the app json coder when blueprint json coder is set to none.
Revert the failling test to using an app_context
re #1710
2016-06-08 12:58:56 +03:00
RamiC
6c37f40c34 Allow per blueprint json encoder decoder
re #1710
2016-06-08 12:03:26 +03:00
Anton Sarukhanov
a4f9c63bb2 Add test for find_default_import_path 2016-06-07 08:03:55 -04:00
David Lord
2560444f47 pass value directly to last_modified 2016-06-05 12:42:34 -07:00
Prachi Shirish Khadke
cd408cc462 Add last_modified arg for send_file
Enhancement: Add last_modified arg of type DateTime to send_file.

Fixes pallets/flask#1321
2016-06-05 10:59:17 -07:00
Hyunchel Kim
266bd27e7b Test side effect (#1889)
Function `prepare_exec_for_file` has a side effect where a path is added to
`sys.path` list.
This commit enhances an exisiting test case for `prepare_exec_for_file`
by testing the side effect of the function and adding necessary
comments.
2016-06-05 10:32:00 -07:00
Giampaolo Eusebi
74dafdf63b Add tests for safe_join 2016-06-04 11:26:44 +02:00
Randy Liou
99eda625f6 Enhance code coverage for Blueprint.endpoint
Add basic test for the endpoint decorator for the Blueprint object.
2016-06-03 16:02:45 -07: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
jphilipsen05
92000b6658 fixed unmatched elif (#1872) 2016-06-03 18:41:10 +02:00
Dan Sully
51c2069872 Remove deprecation warnings for add_etags & mimetype guessing for send_file()
Fix #1849
2016-06-03 14:52:33 +02:00
Markus Unterwaditzer
0265d02b19 Eliminate some resource warnings 2016-06-03 14:29:27 +02:00
Markus Unterwaditzer
25a5d96bbd More explicit warning categories 2016-06-03 14:04:25 +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
David Lord
8c126668a5 Revert "Adds simplejson as a testing target." (#1865) 2016-06-02 14:54:49 -07:00
James Farrington
2739bbfa03 Fixed #1846 2016-06-02 11:58:02 -07:00
Armin Ronacher
c1496c7719 Merge pull request #1822 from pallets/bugfix/better-pop
Improve application context popping
2016-05-26 22:31:15 +02:00
Armin Ronacher
36e6ec9419 Merge pull request #1813 from pallets/bugfix/scheme
Resolve state issue for url_for with forced scheme
2016-05-26 21:48:20 +02:00
Armin Ronacher
308af2812e Improve application context popping
Exceptions during teardown handling will no longer leave application
contexts lingering around.  This fixes #1767
2016-05-26 21:46:56 +02:00
Armin Ronacher
3b98e39768 Implemented simplified CLI interface 2016-05-26 20:07:52 +02:00
dataforger
7108a51bbc fix docstring (#1818)
change string to docstring
2016-05-24 21:06:34 +02:00
Armin Ronacher
d8437ce215 Resolve state issue for url_for with forced scheme
This fixes #1596
2016-05-22 10:45:29 +02:00
Armin Ronacher
f21bac3d66 Always run gc before leak test 2016-05-22 10:34:48 +02:00
Jannis Leidel
9c4a73013c Forward ported CLI tests from Flask-CLI and fixed a bug with the CLI's name. (#1806)
* Forward port the CLI tests from Flask-CLI.

* Make sure the parameter passed to the CLI's AppGroup is the app's name, not the app itself.
2016-05-16 19:36:55 +02: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
David Hou
39534d07d1 Raise BadRequest if static file name is invalid
* Raise BadRequest if static file name is invalid

* Clean up syntax a bit

* Remove unnecessary close()
2016-04-02 21:07:27 +02:00
Shipeng Feng
5e9842dadb Fixed stream_with_context if decorated function has parameters 2016-04-01 16:17:45 -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
David Lord
679315eace Merge pull request #1679 from miguelgrinberg/passthrough-errors
Werkzeug should not block propagated exceptions from Flask
2016-01-25 22:17:04 -08:00
Jeff Widman
4da4fadfc6 Add support for serializing top-level arrays to JSON
Fix #170, #248, #510, #673, #1177
2016-01-13 13:20:11 -08:00
Miguel Grinberg
2bbddf57f8 Werkzeug should not block propagated exceptions from Flask 2016-01-02 14:18:36 -08:00
Timo Furrer
906e72b219 support timedelta for SEND_FILE_MAX_AGE_DEFAULT config variable 2015-10-24 07:04:23 +02: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
Alan Hamlett
a6f9582497 Enable autoescape for render_template_string 2015-07-04 23:41:43 +02:00
ThiefMaster
394acf2112 Add pop and setdefault to AppCtxGlobals 2015-06-20 18:04:58 +02:00
Alexander Pantyukhin
a2c426a6cf Ignore before_render_template return values 2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
e22a104c56 fix test_signals 2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
cf5e02818e fix test_signals 2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
d1c1fa9ce3 before_render_template signal can override render template. 2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
61775bf76b fix endline in the signal.py 2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
cb8edfa806 before_render_template signal 2015-06-17 15:42:39 +02:00
Markus Unterwaditzer
0c442fba62 Rename jinja_env_class
Inspired by #1056
2015-06-06 06:29:26 +02:00
Markus Unterwaditzer
1c7135cc9e Merge branch 'ThiefMaster-override-jinja-env' 2015-06-06 03:30:49 +02:00