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) Inventory.init_db(app)
def setUp(self): """ Runs before each test """ Inventory.init_db("test") Inventory.remove_all() self.app = app.test_client()
def setUp(self): """ Runs before each test """ Inventory.init_db("test") Inventory.remove_all()
def init_db(): """ Initialies the SQLAlchemy app """ global app Inventory.init_db(app)
def setUp(self): Inventory.init_db(app) DB.drop_all() # clean up the last tests DB.create_all() # make our sqlalchemy tables