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, []))
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, []))
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))
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))