def test_db_list(self): """Function: test_db_list Description: Test with list of databases. Arguments: """ self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list2, False, self.dmp_path))
def test_all_dbs(self): """Function: test_all_dbs Description: Test with all databases. Arguments: """ self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd2, self.db_list, False, self.dmp_path))
def test_dump_db(self): """Function: test_dump_db Description: Test with only default arguments passed. Arguments: """ with gen_libs.no_std_out(): self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list, False, self.dmp_path))
def test_all_dbs_w_option(self): """Function: test_all_dbs_w_option Description: Test with -z option with all databases. Arguments: """ self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd2, self.db_list, False, self.dmp_path, err_sup=self.err_sup))
def test_db_list_w_option(self): """Function: test_db_list_w_option Description: Test with -w option with list of databases. Arguments: """ self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list2, False, self.dmp_path, err_sup=self.err_sup))
def test_email(self, mock_list): """Function: test_email Description: Test with email option. Arguments: """ mock_list.return_value = self.filelist self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list2, False, self.dmp_path, err_sup=self.err_sup, mail=self.mail))
def test_email_no_mailx(self, mock_list): """Function: test_email_no_mailx Description: Test with using postfix email command. Arguments: """ mock_list.return_value = self.filelist self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list2, False, self.dmp_path, err_sup=self.err_sup, mail=self.mail))
def test_email_mailx(self, mock_list): """Function: test_email_mailx Description: Test with override postfix and use mailx. Arguments: """ mock_list.return_value = self.filelist self.assertFalse( mysql_db_dump.dump_db(self.dump_cmd, self.db_list2, False, self.dmp_path, err_sup=self.err_sup, mail=self.mail, use_mailx=True))