...
This commit is contained in:
19
services/users/project/tests/base.py
Normal file
19
services/users/project/tests/base.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from flask_testing import TestCase
|
||||
|
||||
from project import create_app, db
|
||||
|
||||
app = create_app()
|
||||
|
||||
|
||||
class BaseTestCase(TestCase):
|
||||
def create_app(self):
|
||||
app.config.from_object('project.config.TestingConfig')
|
||||
return app
|
||||
|
||||
def setUp(self):
|
||||
db.create_all()
|
||||
db.session.commit()
|
||||
|
||||
def tearDown(self):
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
Reference in New Issue
Block a user