Skip to content

Commit

Permalink
Make config_overrides a keyword-only argument to create_app
Browse files Browse the repository at this point in the history
  • Loading branch information
homeworkprod committed Feb 20, 2021
1 parent 26e992e commit 1911903
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions byceps/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

def create_app(
config_filename: Union[Path, str],
*,
config_overrides: Optional[Dict[str, Any]] = None,
) -> Flask:
"""Create the actual Flask application."""
Expand Down
8 changes: 6 additions & 2 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@


def create_admin_app(config_overrides: Optional[Dict[str, Any]] = None):
app = create_app(CONFIG_FILENAME_TEST_ADMIN, config_overrides)
app = create_app(
CONFIG_FILENAME_TEST_ADMIN, config_overrides=config_overrides
)
return app


def create_site_app(config_overrides: Optional[Dict[str, Any]] = None):
app = create_app(CONFIG_FILENAME_TEST_SITE, config_overrides)
app = create_app(
CONFIG_FILENAME_TEST_SITE, config_overrides=config_overrides
)
return app


Expand Down

0 comments on commit 1911903

Please sign in to comment.