Ejemplo n.º 1
0
    def test_true_true_cfg(self, mock_lib):
        """Function:  test_true_true_cfg

        Description:  Test True and True statuses.

        Arguments:

        """

        mock_lib.load_module.return_value = self.cfg
        mock_lib.chk_crt_dir.side_effect = self.results

        self.assertEqual(mail_2_rmq.load_cfg(self.cfg_name, self.cfg_dir),
                         (self.cfg, True, []))
Ejemplo n.º 2
0
    def test_email_dir_true(self, mock_lib):
        """Function:  test_email_dir_true

        Description:  Test with email_dir check success.

        Arguments:

        """

        mock_lib.load_module.return_value = self.cfg
        mock_lib.chk_crt_dir.side_effect = self.results

        self.assertEqual(mail_2_rmq.load_cfg(self.cfg_name, self.cfg_dir),
                         (self.cfg, True, []))
Ejemplo n.º 3
0
    def test_false_false_cfg(self, mock_lib):
        """Function:  test_false_false_cfg

        Description:  Test False and False statuses.

        Arguments:

        """

        mock_lib.load_module.return_value = self.cfg
        mock_lib.chk_crt_dir.side_effect = self.results2

        self.assertEqual(mail_2_rmq.load_cfg(self.cfg_name, self.cfg_dir),
                         (self.cfg, False, self.err_results))
Ejemplo n.º 4
0
    def test_email_dir_false(self, mock_lib):
        """Function:  test_email_dir_false

        Description:  Test with email_dir check failure.

        Arguments:

        """

        mock_lib.load_module.return_value = self.cfg
        mock_lib.chk_crt_dir.side_effect = self.results3

        self.assertEqual(mail_2_rmq.load_cfg(self.cfg_name, self.cfg_dir),
                         (self.cfg, False, self.err_results2))