def setUp(self): config = Config(CONF_FILE) sh = config.get_conf()['sortinghat'] self.sh_kwargs = {'user': sh['user'], 'password': sh['password'], 'database': sh['database'], 'host': sh['host'], 'port': None} # Clean the database to start an empty state Database.drop(**self.sh_kwargs) # Create command Database.create(**self.sh_kwargs) self.sh_db = Database(**self.sh_kwargs)
def tearDown(self): Database.drop(self.kwargs['user'], self.kwargs['password'], self.name, self.kwargs['host'], self.kwargs['port'])
def tearDown(self): Database.drop(database=self.name, **self.kwargs) Database.drop(database=self.name_reuse, **self.kwargs)
def tearDownClass(cls): if cls.create: Database.drop(**cls.db_kwargs)