Esempio n. 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)
     Inventory.init_db(app)
Esempio n. 2
0
 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()
Esempio n. 4
0
def init_db():
    """ Initialies the SQLAlchemy app """
    global app
    Inventory.init_db(app)
Esempio n. 5
0
 def setUp(self):
     Inventory.init_db(app)
     DB.drop_all()  # clean up the last tests
     DB.create_all()  # make our sqlalchemy tables