Пример #1
0
 def setUp(self):
     """ Runs before each test """
     init_db()
     db.drop_all()    # clean up the last tests
     db.create_all()  # create new tables
     self.app = app.test_client()
     self.headers = {
         'X-Api-Key': app.config['API_KEY']
     }
 def tearDown(self):
     db.session.remove()
     db.drop_all()
 def setUp(self):
     """ Runs before each test """
     db.drop_all()  # clean up the last tests
     db.create_all()  # create new tables
     self.app = app.test_client()
Пример #4
0
 def setUp(self):
     Product.init_db(app)
     db.drop_all()  # clean up the last tests
     db.create_all()  # make our sqlalchemy tables
Пример #5
0
 def tearDown(self):
     db.session.remove()
     db.drop_all()
     db.get_engine(app).dispose()
 def setUp(self):
     db.drop_all()  # clean up the last tests
     db.create_all()  # make our sqlalchemy tables