def drop_database(self): """ Drop the database that was used for testing """ if not self.initialised: raise Exception("Cannot drop database when not initialised") from trytond.protocols.dispatcher import drop drop(self.db_name, 'admin')
def drop_db(): # AKE: fix crash in very concurrent context (opened connections) n = 10 i = 0 while True: i += 1 try: if db_exist(): drop(None, DB_NAME, None) break except: if i > n: raise else: time.sleep(3)
def drop_db(): if db_exist(): drop(None, DB_NAME, None)
def drop_db(): if db_exist(): drop(DB_NAME, None)