Forward ported CLI tests from Flask-CLI and fixed a bug with the CLI's name. (#1806)

* Forward port the CLI tests from Flask-CLI.

* Make sure the parameter passed to the CLI's AppGroup is the app's name, not the app itself.
This commit is contained in:
Jannis Leidel 2016-05-16 19:36:55 +02:00 committed by Markus Unterwaditzer
parent 8011e1de28
commit 88500f5cc7
5 changed files with 149 additions and 1 deletions

View file

@ -546,7 +546,7 @@ class Flask(_PackageBoundObject):
#: provided by Flask itself and can be overridden.
#:
#: This is an instance of a :class:`click.Group` object.
self.cli = cli.AppGroup(self)
self.cli = cli.AppGroup(self.name)
def _get_error_handlers(self):
from warnings import warn