Skip to content

test_config not used #37

Closed
Closed
@CurtesMalteser

Description

@CurtesMalteser

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions