def tearDown(self):
     super(TestProgressCalculator, self).tearDown()
     self._unmock_lock()
     setting.COBBLER_INSTALLATION_LOGDIR = (
         self.backup_cobbler_installation_dir
     )
     setting.CHEF_INSTALLATION_LOGDIR = self.backup_chef_installation_dir
     setting.INSTALLATION_LOGDIR = self.backup_installation_dir
     database.drop_db()
Exemplo n.º 2
0
def createdb():
    """Creates database from sqlalchemy models."""
    database.init()
    try:
        database.drop_db()
    except Exception:
        pass

    if setting.DATABASE_TYPE == 'file':
        if os.path.exists(setting.DATABASE_FILE):
            os.remove(setting.DATABASE_FILE)
    database.create_db()
    if setting.DATABASE_TYPE == 'file':
        os.chmod(setting.DATABASE_FILE, 0o777)
Exemplo n.º 3
0
def createdb():
    """Creates database from sqlalchemy models."""
    database.init()
    try:
        database.drop_db()
    except Exception:
        pass

    if setting.DATABASE_TYPE == 'file':
        if os.path.exists(setting.DATABASE_FILE):
            os.remove(setting.DATABASE_FILE)
    database.create_db()
    if setting.DATABASE_TYPE == 'file':
        os.chmod(setting.DATABASE_FILE, 0o777)
Exemplo n.º 4
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(ApiTestCase, self).tearDown()
 def tearDown(self):
     super(MetadataTestCase, self).setUp()
     reload(setting)
     database.drop_db()
Exemplo n.º 6
0
 def tearDown(self):
     reload(setting)
     database.drop_db()
Exemplo n.º 7
0
 def tearDown(self):
     super(BaseTest, self).setUp()
     reload(setting)
     database.drop_db()
Exemplo n.º 8
0
 def tearDown(self):
     super(MetadataTestCase, self).setUp()
     reload(setting)
     database.drop_db()
Exemplo n.º 9
0
def dropdb():
    """Drops database from sqlalchemy models."""
    database.init()
    database.drop_db()
Exemplo n.º 10
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestCheckMac, self).tearDown()
Exemplo n.º 11
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestDelDbObject, self).tearDown()
Exemplo n.º 12
0
 def tearDown(self):
     super(AdapterTestCase, self).tearDown()
     util.load_configs = self.backup_adapter_configs
     reload(setting)
     database.drop_db()
Exemplo n.º 13
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestModelFilter, self).tearDown()
Exemplo n.º 14
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestCheckMac, self).tearDown()
Exemplo n.º 15
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestDelDbObject, self).tearDown()
Exemplo n.º 16
0
 def tearDown(self):
     super(AdapterTestCase, self).tearDown()
     util.load_configs = self.backup_adapter_configs
     reload(setting)
     database.drop_db()
Exemplo n.º 17
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(ApiTestCase, self).tearDown()
Exemplo n.º 18
0
 def tearDown(self):
     database.drop_db()
     reload(setting)
     super(TestModelFilter, self).tearDown()
Exemplo n.º 19
0
def dropdb():
    """Drops database from sqlalchemy models."""
    database.init()
    database.drop_db()
Exemplo n.º 20
0
 def tearDown(self):
     super(BaseTest, self).setUp()
     reload(setting)
     database.drop_db()
Exemplo n.º 21
0
 def tearDown(self):
     database.drop_db()
     super(ApiTestCase, self).tearDown()
Exemplo n.º 22
0
 def tearDown(self):
     reload(setting)
     database.drop_db()