forked from orbit-oss/flask
cli loader handles kwargs in app factory
This commit is contained in:
parent
c3f923d0e0
commit
9f0da9b770
3 changed files with 26 additions and 12 deletions
|
|
@ -74,6 +74,15 @@ def test_find_best_app(test_apps):
|
|||
assert isinstance(app, Flask)
|
||||
assert app.name == "appname"
|
||||
|
||||
class Module:
|
||||
@staticmethod
|
||||
def create_app(**kwargs):
|
||||
return Flask("appname")
|
||||
|
||||
app = find_best_app(script_info, Module)
|
||||
assert isinstance(app, Flask)
|
||||
assert app.name == "appname"
|
||||
|
||||
class Module:
|
||||
@staticmethod
|
||||
def create_app(foo):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue