Skip to content

Instantly share code, notes, and snippets.

@javamo
Created November 9, 2017 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javamo/26ea38218400942e280f1a951b2dcf33 to your computer and use it in GitHub Desktop.
Save javamo/26ea38218400942e280f1a951b2dcf33 to your computer and use it in GitHub Desktop.
tests/base.py
from flask_testing import TestCase
from app import create_app, db
class BaseTestCase(TestCase):
def create_app(self):
return create_app("testing")
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment