Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_config not used #37

Closed
CurtesMalteser opened this issue Feb 23, 2024 · 4 comments
Closed

test_config not used #37

CurtesMalteser opened this issue Feb 23, 2024 · 4 comments

Comments

@CurtesMalteser
Copy link
Contributor

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?

@sarah-udacity
Copy link
Collaborator

Thank you. Please submit a PR.

@CurtesMalteser
Copy link
Contributor Author

Great, thank you for your quick response.
I crated the PR that can be found here: #38

@CurtesMalteser
Copy link
Contributor Author

Not yet merged

@CurtesMalteser
Copy link
Contributor Author

Thanks 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants