def setUp(self): """ Set up the environnment, ran before every tests. """ if '///' in DB_PATH: dbfile = DB_PATH.split('///')[1] if os.path.exists(dbfile): os.unlink(dbfile) self.session = model.create_tables(DB_PATH, debug=False) APP.before_request(FAS._check_session)
def setUp(self): """ Set up the environnment, ran before every tests. """ if '///' in DB_PATH: dbfile = DB_PATH.split('///')[1] if os.path.exists(dbfile): os.unlink(dbfile) self.session = model.create_tables(DB_PATH, debug=False) # Create the docker namespace obj = model.Namespace('docker') self.session.add(obj) self.session.commit() APP.before_request(FAS._check_session)