Fix registering partials as view functions

This commit is contained in:
ThiefMaster 2018-04-27 13:38:35 +02:00
parent 8ceff653c5
commit 6663bf1f7d
3 changed files with 5 additions and 1 deletions

View file

@ -9,6 +9,7 @@
:license: BSD, see LICENSE for more details.
"""
import functools
import pytest
import flask
@ -382,6 +383,8 @@ def test_route_decorator_custom_endpoint_with_dots(app, client):
)
)
bp.add_url_rule('/bar/456', endpoint='foofoofoo', view_func=functools.partial(foo_foo_foo))
app.register_blueprint(bp, url_prefix='/py')
assert client.get('/py/foo').data == b'bp.foo'