Пример #1
0
def init_db():
    """ Initialies the SQLAlchemy app """
    Shopcart.init_db(app)
    ShopcartItem.init_db(app)
    logger.info("Database has been initialized!")
Пример #2
0
 def setUpClass(cls):
     """ These run once before Test suite """
     app.debug = False
     # Set up the test database
     app.config["SQLALCHEMY_DATABASE_URI"] = DATABASE_URI
     ShopcartItem.init_db(app)