Antoine Catton
516ce59f95
Add the ability to combine MethodViews
9 years ago
Kiss György
1b764cff93
Added runner fixture
9 years ago
Kiss György
b8e826c16b
Added tests, fixed some minor alignment problems.
9 years ago
Dave Barker
1a67e284d0
Remove unnecessary werkzeug mock attribs from test
9 years ago
Dave Barker
24289e97af
Add test for new template auto reload debug behaviour
9 years ago
RamiC
4305ebdf66
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
9 years ago
RamiC
501b8590dd
Allow per blueprint json encoder decoder
...
re #1710
9 years ago
Anton Sarukhanov
5eaed37116
Add test for find_default_import_path
9 years ago
David Lord
7c271401b2
pass value directly to last_modified
9 years ago
Prachi Shirish Khadke
af515cc7ea
Add last_modified arg for send_file
...
Enhancement: Add last_modified arg of type DateTime to send_file.
Fixes pallets/flask#1321
9 years ago
Hyunchel Kim
64a37bb9b7
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.
9 years ago
Giampaolo Eusebi
06a170ea9b
Add tests for safe_join
9 years ago
Randy Liou
954b7ef7bb
Enhance code coverage for Blueprint.endpoint
...
Add basic test for the endpoint decorator for the Blueprint object.
9 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
Josiah Philipsen
41e08f4ccd
fixed unmatched elif
...
Also update relevant test
9 years ago
jphilipsen05
fe5f714026
fixed unmatched elif ( #1872 )
9 years ago
Dan Sully
8458cc5cd1
Remove deprecation warnings for add_etags & mimetype guessing for send_file()
...
Fix #1849
9 years ago
Markus Unterwaditzer
6c359e0f53
Eliminate some resource warnings
9 years ago
Markus Unterwaditzer
293eb583f6
More explicit warning categories
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
David Lord
024fbe5a60
Revert "Adds simplejson as a testing target." ( #1865 )
9 years ago
James Farrington
390cd5e4ee
Fixed #1846
9 years ago
Armin Ronacher
8482ce6b8c
Improve application context popping
...
Exceptions during teardown handling will no longer leave application
contexts lingering around. This fixes #1767
9 years ago
Armin Ronacher
523e271183
Implemented simplified CLI interface
9 years ago
dataforger
92f63a1c1d
fix docstring ( #1818 )
...
change string to docstring
9 years ago
Armin Ronacher
6aee9f6d77
Resolve state issue for url_for with forced scheme
...
This fixes #1596
9 years ago
Armin Ronacher
883cb7cedc
Always run gc before leak test
9 years ago
Jannis Leidel
88500f5cc7
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.
9 years ago
Steven Loria
2bf477cfea
Add JSONIFY_MIMETYPE configuration variable ( #1728 )
...
Allow jsonify responses' mimetype to be configured
9 years ago
David Hou
9f1be8e795
Raise BadRequest if static file name is invalid
...
* Raise BadRequest if static file name is invalid
* Clean up syntax a bit
* Remove unnecessary close()
9 years ago
Shipeng Feng
cc536c8a7b
Fixed stream_with_context if decorated function has parameters
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
Jeff Widman
daceb3e3a0
Add support for serializing top-level arrays to JSON
...
Fix #170 , #248 , #510 , #673 , #1177
9 years ago
Miguel Grinberg
952a6c8989
Werkzeug should not block propagated exceptions from Flask
9 years ago
Timo Furrer
d526932a09
support timedelta for SEND_FILE_MAX_AGE_DEFAULT config variable
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).
9 years ago
Alan Hamlett
99c99c4c16
Enable autoescape for `render_template_string`
10 years ago
ThiefMaster
bbaf20de7c
Add pop and setdefault to AppCtxGlobals
10 years ago
Alexander Pantyukhin
5e12748d0e
Ignore before_render_template return values
10 years ago
Alexander Pantyukhin
eae37b575d
fix test_signals
10 years ago
Alexander Pantyukhin
e57199e0c4
fix test_signals
10 years ago
Alexander Pantyukhin
967907ee81
before_render_template signal can override render template.
10 years ago
Alexander Pantyukhin
1fbeb337c4
fix endline in the signal.py
10 years ago
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