def app(): application = create_app() application.app_context().push() application.db.create_all() return application
from users.app import create_app from users.models import UserModel if __name__ == '__main__': app = create_app() app.app_context().push() app.db.drop_all() app.db.create_all()
def setUp(self): self.app = create_app('TEST').app
def setUp(self): app = create_app("TEST") self.app = app.app self.app.config['TESTING'] = True
from users.app import create_app application = create_app()