예제 #1
0
    def test_help_true(self, mock_arg, mock_help):
        """Function:  test_help_true

        Description:  Test help if returns true.

        Arguments:

        """

        mock_arg.return_value = self.args_array
        mock_help.return_value = True

        self.assertFalse(mongo_rep_admin.main())
예제 #2
0
    def test_arg_cond_false(self, mock_arg, mock_help, mock_req, mock_cond):
        """Function:  test_arg_cond_false

        Description:  Test arg_cond_req if returns false.

        Arguments:

        """

        mock_arg.return_value = self.args_array
        mock_help.return_value = False
        mock_req.return_value = False
        mock_cond.return_value = False

        self.assertFalse(mongo_rep_admin.main())
예제 #3
0
    def test_arg_file_true(self, mock_arg, mock_help):
        """Function:  test_arg_file_true

        Description:  Test arg_file_chk 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_file_chk.return_value = True
        mock_arg.arg_dir_chk_crt.return_value = False
        mock_arg.arg_file_chk.return_value = True

        self.assertFalse(mongo_rep_admin.main())
예제 #4
0
    def test_arg_dir_true(self, mock_arg, mock_help, mock_req, mock_cond,
                          mock_dir):
        """Function:  test_arg_dir_true

        Description:  Test arg_dir_chk_crt if returns true.

        Arguments:

        """

        mock_arg.return_value = self.args_array
        mock_help.return_value = False
        mock_req.return_value = False
        mock_cond.return_value = True
        mock_dir.return_value = True

        self.assertFalse(mongo_rep_admin.main())