Josh Rowe
8a8a608152
Move object_hook outside loads method so class can be extend and reused
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
Paul Brown
0832e77b14
prevent NoAppException when ImportError occurs within imported module
8 years ago
Markus Unterwaditzer
789715adb9
Fix config.from_pyfile on Python 3 ( #2123 )
...
* Fix config.from_pyfile on Python 3
Fix #2118
* Support Python 2.6
* Fix tests on Python 2
8 years ago
Jiri Kuncar
36425d5f91
Ignore cache on request.get_json(cache=False) call ( #2089 )
...
* Test cache argument of Request.get_json
* Ignore cache on request.get_json(cache=False) call
Removes usage of `_cached_json` property when `get_json` is called with
disabled cache argument. (closes #2087 )
8 years ago
Alex Kahan
2647fc7112
Parameterizing test ( #2073 )
8 years ago
Michael Recachinas
bd5e297aa9
Default environ ( #2047 )
...
* Add init to FlaskClient
This addresses #1467 . The init in the subclass
can now take in `environ_base`, which will then get
passed to `make_test_environ_builder` and to
`EnvironBuilder` via keyword args.
This should provide the default environment capability
on `app.test_client()` init.
* Add kwarg `environ_base` to `make_test_environ_builder` call
This change now passes `environ_base` from either
`kwargs` in `FlaskClient.open` or `FlaskClient.environ_base`
if passed into the init.
* Fix assignment reference typo
* Add default `environ_base` to `FlaskClient.__init__`
* Set default kwargs for `environ_base` in `FlaskClient.open`
* Remove specific environ_base kwarg since its in kwargs
* Add docstring to FlaskClient detailing environ_base
* Document app.test_client default environ in CHANGES
* Re-word environ_base changes in FlaskClient docstring
* Add client.environ_base tests
* Mention preset default environ in `app.test_client`
* Add versionchanged directive to docstring in FlaskClient
8 years ago
Joël Charles
7186a5aaf5
make use of range requests if available in werkzeug ( #2031 )
...
* make use of range requests if available in werkzeug
* different logic for testing werkzeug functionality
8 years ago
Armin Ronacher
a30951ec28
Do not error for unknown files if send_file sends an actual file
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
Roman
92ce20eeac
Fix error in send_file helper ( #2003 )
...
* Fix error in send_file (mimetype_filename is not defined)
* fix formatting error message in send_file
8 years ago
Markus Unterwaditzer
098ea0c8ca
Only passthrough_errors if PROPAGATE_EXCEPTIONS
...
See pallets/werkzeug#954
8 years ago
Markus Unterwaditzer
71e10be286
Properly remove f.name usage in send_file ( #1988 )
...
* Properly remove f.name usage in send_file
* Update changelogs
* Fix tests
8 years ago
David Lord
f193f590bc
clean up new json tests
8 years ago
Nathan Land
f16e477b2a
Add tests for flask.json.dump() and test that jsonify correctly converts uuids.
8 years ago
Anton Sarukhanov
9121e109bd
Add test for get_version (CLI) ( #1884 )
8 years ago
Adam Byrtek
ca547f0ec3
JSON response tests and first draft of code that passes
8 years ago
Adam Byrtek
6c5ef2bc5c
Use `content_type` kwarg instead of manipulating headers
8 years ago
Adam Byrtek
c4139e0e5d
JSON support for the Flask test client
8 years ago
Nate Prewitt
0f1cf50f97
adding in try around __import__ to catch invalid files/paths ( #1950 )
8 years ago
Hyunchel Kim
f19d3bd67e
Enhance tests.test_cli.test_find_best_app ( #1882 )
...
This commit adds a test case for `test_find_best_app` where
Module object does not contain Flask application.
Also cleans the function little bit to provides more meaningful comment.
8 years ago
Antoine Catton
516ce59f95
Add the ability to combine MethodViews
8 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