def tearDown(self): """ Remove the test.db database if there is one. """ if '///' in DB_PATH: dbfile = DB_PATH.split('///')[1] if os.path.exists(dbfile): os.unlink(dbfile) self.session.rollback() self.session.close() if DB_PATH.startswith('postgres'): if 'localhost' in DB_PATH: model.drop_tables(DB_PATH, self.session.bind) else: db_name = DB_PATH.rsplit('/', 1)[1] req = requests.get('%s/clean/%s' % (FAITOUT_URL, db_name)) print req.text
def tearDown(self): """ Remove the test.db database if there is one. """ if "///" in DB_PATH: dbfile = DB_PATH.split("///")[1] if os.path.exists(dbfile): os.unlink(dbfile) self.session.rollback() self.session.close() if DB_PATH.startswith("postgres"): if "localhost" in DB_PATH: model.drop_tables(DB_PATH, self.session.bind) else: db_name = DB_PATH.rsplit("/", 1)[1] req = requests.get("%s/clean/%s" % (FAITOUT_URL, db_name)) print req.text