David Lord
66b1b752da
simplify logging configuration
...
single default handler and formatter
don't remove handlers
configure level once using setLevel
document logging
reorganize logging tests
2017-07-31 12:49:03 -07:00
David Lord
a89bdb3395
prefer the url's scheme over the kwarg
...
tabs -> spaces
add test
add changelog
2017-07-29 13:03:08 -07:00
David Lord
491d331e6e
load env vars using python-dotenv
2017-07-16 13:37:51 -07:00
David Lord
fb845b9032
allow local packages in FLASK_APP
...
don't require .py extension in FLASK_APP
add tests for nested package loading
parametrize cli loading tests
2017-07-14 19:49:05 -07:00
David Lord
59f7966e31
support passing environ to test client ( #2412 )
...
closes #2411
2017-07-13 08:42:53 -07:00
David Lord
9560f22bb6
clean up
2017-07-10 07:10:47 -07:00
Bijan Vakili
a417e41d27
Update documentation and regression tests to clarify that Flask.teardown_appcontext() only receives unhandled exceptions
2017-07-07 17:34:44 -07:00
William Horton
5909e26fba
Remove unused import from test_basic ( #2403 )
2017-06-30 17:28:48 +02:00
David Lord
465922e5f1
clean up secret key docs
...
consistent key across docs and examples
consistent key across tests, set in conftest
2017-06-28 07:58:06 -07:00
David Lord
5bc0d15359
un-deprecate request.json
2017-06-26 09:34:26 -07:00
David Lord
715a9a3e7b
remove deprecated flask.ext
2017-06-26 08:47:28 -07:00
David Lord
723e665004
remove deprecated Request.module
2017-06-26 07:46:33 -07:00
David Lord
d63c2bc417
remove deprecated Flask.static_path
2017-06-26 07:45:29 -07:00
David Lord
448368e226
style cleanup
...
[ci skip]
2017-06-16 06:59:37 -07:00
Miguel Grinberg
7c40aa9e50
Import app from wsgi.py or app.py if FLASK_APP is not defined
...
Fixes #2376
2017-06-15 11:27:50 -07:00
Eugene M. Kim
63ccdada1b
Actually hand-spin and use a tzinfo subclass
...
This is for Python 2.x compatibility.
Suggested-by: David Lord <davidism@gmail.com>
2017-06-14 14:23:13 -07:00
Eugene M. Kim
f803760275
Re-revert to not using pytz
...
Will spin a tzinfo subclass.
2017-06-14 14:14:18 -07:00
Eugene M. Kim
34050630d6
Skip aware datetime tests if pytz is unavailable
2017-06-14 14:08:42 -07:00
Eugene M. Kim
eb9618347c
Use pytz again for tests
...
This is because datetime.timezone is Python 3 only. The only
alternative would be to hand-spin a datetime.tzinfo subclass, an
overkill.
This reverts commit 0e6cab3576 .
2017-06-14 13:57:40 -07:00
Eugene M. Kim
5b38fe2fbe
Merge branch 'master' of github.com:pallets/flask into json_encode_non_utc_datetimes
2017-06-14 13:11:53 -07:00
Eugene M. Kim
0e6cab3576
Rewrite test_jsonify_aware_datetimes without pytz
2017-06-14 13:06:26 -07:00
David Lord
4d2a3ab2e0
test no debug flag doesn't reconfigure
...
test templates_auto_reload property instead of config
use app fixture in test
2017-06-14 12:31:56 -07:00
Eugene M. Kim
d75d83defd
Add UTs for #2372
...
test_encode_aware_datetime() fails for non-UTC timezones due to the bug.
2017-06-14 12:22:09 -07:00
David Lord
9e39c506e0
Merge branch 'master' into reload_templates_run_debug
2017-06-14 09:58:33 -07:00
David Lord
5c12acefbb
failing test
2017-06-05 06:14:13 -07:00
David Lord
e97253e4c1
clean up JSON code and docs
2017-06-04 11:44:00 -07:00
David Lord
dbc70c9274
Merge remote-tracking branch 'remotes/origin/master' into json-mixin
2017-06-04 09:42:39 -07:00
David Lord
5978a0f55f
failing test for streaming session
2017-06-02 11:07:53 -07:00
David Lord
fd8b95952c
add tests for flask.json.tag
2017-06-02 10:01:30 -07:00
David Lord
ea2e9609bc
Merge branch 'master' into json-object-hook
2017-06-01 06:40:27 -07:00
David Lord
859d9a9d5c
show nice message when registering error handler for unknown code
...
clean up error handler docs
closes #1837
2017-05-31 18:04:08 -07:00
David Lord
42905b8a55
set description for trap as well as debug
...
test for key error description
2017-05-29 19:41:07 -07:00
David Lord
045dccaefb
make debugging bad key errors easier
...
* TRAP_BAD_REQUEST_ERRORS is enabled by default in debug mode
* BadRequestKeyError has the key in the description in debug mode
closes #382
2017-05-29 19:08:25 -07:00
David Lord
b8eba0a3fa
use existing response.vary property to set vary header
...
closes #2345
2017-05-29 10:09:24 -07:00
David Lord
a37f675ccb
Merge remote-tracking branch 'origin/0.10-maintenance'
...
refactor make_test_environ_builder
2017-05-28 07:25:15 -07:00
Kenneth Reitz
090109b637
Merge pull request #2326 from HndrkMkt/#2264-handle-app-factory-in-FLASK_APP
...
Handle app factory with arguments in FLASK_APP
2017-05-25 14:57:17 -07:00
Kenneth Reitz
d911c897ee
Merge branch 'master' into master
2017-05-25 14:22:53 -07:00
Hendrik Makait
48c2925664
Factor in code review comments and refactor functions to be more naturally split.
2017-05-25 11:28:20 -07:00
Hendrik Makait
7106fb6357
Handle app factory with arguments in FLASK_APP
2017-05-25 10:11:42 -07:00
Nina Zakharenko
e7cd68ba58
Don't overwrite Vary header when setting for cookie access #2317
2017-05-24 20:05:11 -07:00
Christian Stade-Schuldt
4ec1fbc9f5
More DRYing up the test suite ( #2325 )
2017-05-24 17:27:36 -07:00
David Lord
c62b614d9c
Merge pull request #2324 from rzelayafavila/2313-refactor-gevent-tests-into-class
...
Fix for Issue 2313 - refactoring gevent tests into class
2017-05-23 17:31:44 -07:00
David Lord
849fc4b90c
Merge pull request #2323 from dawran6/test-fixture
...
Cleanup test_blueprint.py to use test fixtures
2017-05-23 17:14:57 -07:00
Rene A. Zelaya
d29dbe14cf
Correcting name of GreenletContextCopying test class (to start with 'Test'), making it extend object, and also having the test methods in it include 'self' as first argument.
2017-05-23 16:51:50 -07:00
Rene A. Zelaya
f40617029a
Merge remote-tracking branch 'pallets/master' into 2313-refactor-gevent-tests-into-class
2017-05-23 16:45:47 -07:00
Rene A. Zelaya
2eb28165a9
Bundling 'test_greenlet_context_copying' functions into a new class in tests/test_reqctx.py.
2017-05-23 16:45:11 -07:00
Randy Liou
c03a82713a
Cleanup test_blueprint.py to use test fixtures
...
Modify several tests to use the app and client test fixtures.
2017-05-23 16:42:14 -07:00
Randy Liou
3fce4898f8
Add test for Blueprint app-wide url processing
...
The test add coverage for methods: Blueprint.app_url_defaults, and
Blueprint.app_url_preprocessing. This PR increases the coverage of
blueprint module by 2%.
2017-05-23 16:26:53 -07:00
David Lord
39f7aaa416
Merge pull request #2319 from HndrkMkt/#2266-support-create-app-without-script-info
...
Support `create_app` without script_info or with script_info as named argument
2017-05-23 16:24:29 -07:00
Christian Stade-Schuldt
5b0b9717da
DRYing up the test suite using pytest fixtures ( #2306 )
...
* add fixtures to conftest.py
* use fixtures in test_appctx.py
* use fixtures in test_blueprints.py
* use fixtures in test_depreciations.py
* use fixtures in test_regressions.py
* use fixtures in test_reqctx.py
* use fixtures in test_templating.py
* use fixtures in test_user_error_handler.py
* use fixtures in test_views.py
* use fixtures in test_basics.py
* use fixtures in test_helpers.py
* use fixtures in test_testing.py
* update conftest.py
* make docstrings PEP-257 compliant
* cleanup
* switch dictonary format
* use pytest parameterization for test_json_as_unicode
2017-05-23 15:18:39 -07:00