nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00328
Re: [Merge] ~xavpaice/hw-health-charm:cron_mdadm_unittests into hw-health-charm:master
Review: Needs Fixing
lgtm. For code readability, all func args can be written on the same line.
Diff comments:
> diff --git a/src/tests/unit/test_cron_mdadm.py b/src/tests/unit/test_cron_mdadm.py
> index dffd65b..016745e 100644
> --- a/src/tests/unit/test_cron_mdadm.py
> +++ b/src/tests/unit/test_cron_mdadm.py
> @@ -29,10 +29,13 @@ class TestCronMdadm(unittest.TestCase):
>
> @mock.patch('os.path.exists')
> @mock.patch('subprocess.Popen')
> - def test_get_devices_mdadm_exception(self, mdadm_details, path_exists):
> + @mock.patch('sys.exit')
> + def test_get_devices_mdadm_exception(self, mock_exit, mdadm_details,
> + path_exists):
New max-lines is 120, so all args can be on the same line.
> path_exists.return_value = True
> mdadm_details.side_effect = subprocess.CalledProcessError(
> 1, 'unittest')
> + mock_exit.return_value = 0
> self.assertEqual(cron_mdadm.get_devices(), set())
>
> @mock.patch('cron_mdadm.generate_output')
--
https://code.launchpad.net/~xavpaice/hw-health-charm/+git/hw-health-charm/+merge/363450
Your team Nagios Charm developers is subscribed to branch hw-health-charm:master.
References