Пример #1
0
 def setUpClass(cls):
     """ This runs once before the entire test suite """
     app.config['TESTING'] = True
     app.config['DEBUG'] = False
     app.config["SQLALCHEMY_DATABASE_URI"] = DATABASE_URI
     app.logger.setLevel(logging.CRITICAL) # pylint: disable=maybe-no-member
     Order.init_db(app)
Пример #2
0
 def setUp(self):
     Order.init_db(app)
     db.drop_all()  # clean up the last tests
     db.create_all()  # make our sqlalchemy tables
Пример #3
0
def init_db():
    """ Initialies the SQLAlchemy app """
    global app
    Order.init_db(app)
 def setUp(self):
     Order.init_db(app)
     db.drop_all()
     db.create_all()
Пример #5
0
def init_db():
    """ Initialies the SQLAlchemy app """
    global app  # pylint: disable=locally-disabled, invalid-name
    Order.init_db(app)