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%.
* 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
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None
Corresponding tests also added.
Ref issue #941, pr #1383, #2082, #2144
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None
Corresponding tests also added.
Ref issue #941, pr #1383, #2082, #2144
Test the following methods in the Blueprint object: teardown_request,
and teardown_app_request.
This PR increases the coverage of blueprint module by 3%.
Add test to cover following methodss to the Blueprint object:
before_request, after_request, before_app_request,
before_app_first_request, after_app_request.
This PR increases the coverage of flask.blueprints by 6%.
This tests the Blueprint.add_app_template_global mothod, which internally
calls the Blueprint.app_template_global method. The methods are used to
registering a function to the jinja template environment.
This PR increases the test coverage for module flask.blueprint by 4%.
Test both context_processor and app_context_processor functions.
Two context parameters are added into the context: one added to
the blueprint locally; another added to the app globally. The test
asserts the behaviors in both blueprint scope and the app scope.
The coverage for flask.blueprints is increased by 3%.
This test case registers an application-wise error handler from
a Blueprint. Verifies the error handler by aborting the flask app
from the application itself as well as from another registered
Blueprint.
sort by endpoint by default
combine sort flags
sort methods
ignore HEAD and OPTIONS methods by default
rearrange columns
use format to build row format string
rework tests
add changelog
* be explicit about how tuples are unpacked
* allow bytes for status value
* allow Headers for headers value
* use TypeError instead of ValueError
* errors are more descriptive
* document that view must not return None
* update documentation about return values
* test more response types
* test error messages
closes#1676
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.
Also, parse_options_header seems to interpret filename* so we better
test the actual value used in the headers (and since it's valid
in any order, use a set to compare)