nopaque/opaque.py

22 lines
519 B
Python
Raw Normal View History

from app import create_app, db
from app.models import User, Role, Permission
from flask_migrate import Migrate
2019-07-03 13:40:45 +00:00
import os
2019-07-03 08:31:23 +00:00
2019-07-03 13:40:45 +00:00
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
migrate = Migrate(app, db)
@app.shell_context_processor
def make_shell_context():
return dict(db=db, User=User, Role=Role, Permission=Permission)
2019-07-08 08:52:36 +00:00
@app.cli.command()
def test():
"""Run the unit tests."""
import unittest
tests = unittest.TestLoader().discover('tests')
unittest.TextTestRunner(verbosity=2).run(tests)