Skip to content

Commit

Permalink
fix(app): load the specified test config even if the mapping is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xenophonf committed Sep 9, 2024
1 parent 2756dc8 commit 68db07a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def create_app(test_config=None) -> Flask:
BOOTSTRAP_SERVE_LOCAL=True,
SECRET_KEY="dev",
)
if test_config:
app.config.from_mapping(test_config)
else:
if test_config is None:
app.config.from_pyfile("config.py", silent=True)
else:
app.config.from_mapping(test_config)

# load extensions
bootstrap.init_app(app)
Expand Down

0 comments on commit 68db07a

Please sign in to comment.