def test_run_program(self, mock_inst): """Function: test_run_program Description: Test run_program function. Arguments: """ mock_inst.return_value = self.server self.assertFalse( mongo_db_dump.run_program(self.args_array, self.func_dict))
def test_email_no_subj(self, mock_inst): """Function: test_email_no_subj Description: Test with no subject line passed. Arguments: """ mock_inst.return_value = self.server self.assertFalse( mongo_db_dump.run_program(self.args_array2, self.func_dict))
def test_suppress_success(self, mock_inst): """Function: test_suppress_success Description: Test with successful dump and suppression. Arguments: """ mock_inst.return_value = self.server self.assertFalse( mongo_db_dump.run_program(self.args_array, self.func_dict))
def test_dump_error(self, mock_inst): """Function: test_dump_error Description: Test with dump returning error. Arguments: """ mock_inst.return_value = self.server with gen_libs.no_std_out(): self.assertFalse( mongo_db_dump.run_program(self.args_array, self.func_dict2))
def test_suppress_failure(self, mock_inst): """Function: test_suppress_failure Description: Test with dump failure and suppression. Arguments: """ mock_inst.return_value = self.server with gen_libs.no_std_out(): self.assertFalse( mongo_db_dump.run_program(self.args_array4, self.func_dict2))
def test_connect_failure(self, mock_inst): """Function: test_connect_failure Description: Test with connection failure. Arguments: """ self.server.status = False self.server.errmsg = "Connection failure" mock_inst.return_value = self.server with gen_libs.no_std_out(): self.assertFalse( mongo_db_dump.run_program(self.args_array, self.func_dict))