Beispiel #1
0
 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')
Beispiel #2
0
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)
Beispiel #3
0
def drop_db():
    if db_exist():
        drop(None, DB_NAME, None)
Beispiel #4
0
def drop_db():
    if db_exist():
        drop(DB_NAME, None)