Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Cascade note deletion when the ticket is deleted #419

Merged
merged 2 commits into from
Nov 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Initialize a fresh db once per session
  • Loading branch information
NickSchimek committed Nov 22, 2021
commit cec6d9f71b9bd1538221b3e833763ec9194b7fab
9 changes: 9 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from flask import current_app
from app import create_app

from db import db
from data.seed import Seed
from tests.factory_fixtures import * # noqa: F401, F403

Expand All @@ -19,6 +20,14 @@ def app(monkeypatch):
return app


@pytest.fixture(scope="session", autouse=True)
def db_setup():
app = create_app("testing")
with app.app_context():
db.drop_all()
db.create_all()


@pytest.fixture(autouse=True)
def app_context(app):
Seed().destroy_all()
Expand Down