def test_help_true(self, mock_arg, mock_help): """Function: test_help_true Description: Test help if returns true. Arguments: """ mock_arg.arg_parse2.return_value = self.args_array mock_help.return_value = True self.assertFalse(mongo_db_data.main())
def test_arg_dir_chk_crt_true(self, mock_arg, mock_help): """Function: test_arg_dir_chk_crt_true Description: Test arg_dir_chk_crt if returns true. Arguments: """ mock_arg.arg_parse2.return_value = self.args_array mock_help.return_value = False mock_arg.arg_require.return_value = False mock_arg.arg_dir_chk_crt.return_value = True self.assertFalse(mongo_db_data.main())
def test_arg_noreq_xor_false(self, mock_arg, mock_help): """Function: test_arg_noreq_xor_false Description: Test arg_noreq_xor if returns false. Arguments: """ mock_arg.arg_parse2.return_value = self.args_array mock_help.return_value = False mock_arg.arg_require.return_value = False mock_arg.arg_dir_chk_crt.return_value = False mock_arg.arg_xor_dict.return_value = True mock_arg.arg_cond_req.return_value = True mock_arg.arg_noreq_xor.return_value = False self.assertFalse(mongo_db_data.main())
def test_process_f_option(self, mock_arg, mock_lib, mock_run): """Function: test_process_f_option Description: Test with processing -f option. Arguments: """ mock_arg.arg_parse2.return_value = self.args_array2 mock_lib.help_func.return_value = False mock_arg.arg_require.return_value = False mock_arg.arg_dir_chk_crt.return_value = False mock_arg.arg_xor_dict.return_value = True mock_arg.arg_cond_req.return_value = True mock_arg.arg_noreq_xor.return_value = True mock_arg.arg_file_chk.return_value = False mock_run.return_value = True mock_lib.rm_dup_list.return_value = ["File1"] self.assertFalse(mongo_db_data.main())