Skip to content

Instantly share code, notes, and snippets.

@marcuxyz
Created September 26, 2020 13:34

Revisions

  1. marcuxyz created this gist Sep 26, 2020.
    9 changes: 9 additions & 0 deletions fixture.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    @pytest.fixture
    def create_database(app):
    with app.app_context():
    db.create_all()

    yield db

    db.session.remove()
    db.drop_all()