Exemplo 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)
Exemplo n.º 2
0
 def setUp(self):
     """ Runs before each test """
     Inventory.init_db("test")
     Inventory.remove_all()
     self.app = app.test_client()
Exemplo n.º 3
0
 def setUp(self):
     """ Runs before each test """
     Inventory.init_db("test")
     Inventory.remove_all()
Exemplo n.º 4
0
def init_db():
    """ Initialies the SQLAlchemy app """
    global app
    Inventory.init_db(app)
Exemplo 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