Closed
Description
Hello,
I'm student of the Full Stack Web Developer nanodegree and I'm wondering if I can open a PR to solve the following issue.
The setup_db
is called on test_flaskr.py
after it was called by the create_app()
.
This is not allowed on new Flask versions.
Though it worked I think it was always cumbursome.
We should use the test_config
argument from create_app()
to pass the db uri as arg, and on create_app()
parse the test config and pass the db path to setup_db
if the test config is not none.
This is the create_app(test_config=None)
signature and the setup_db(app, database_path=database_path)
goes like this.
Would be ok if I propose this change on a PR?
Or would you prefer to apply this change for the future students?
Metadata
Metadata
Assignees
Labels
No labels