21 lines
371 B
Python
21 lines
371 B
Python
|
|
|
|
from flask_testing import TestCase
|
|
from backend import app, db
|
|
|
|
|
|
class BaseTestCase(TestCase):
|
|
""" Base Tests """
|
|
|
|
def create_app(self):
|
|
app.config.from_object('backend.config.Config')
|
|
return app
|
|
|
|
def setUp(self):
|
|
db.create_all()
|
|
db.session.commit()
|
|
|
|
def tearDown(self):
|
|
db.session.remove()
|
|
db.drop_all()
|