← Back to team overview

nagios-charmers team mailing list archive

[Merge] ~aluria/hw-health-charm/+git/hw-health-charm:lint-test-actions into hw-health-charm:master

 

Alvaro Uria has proposed merging ~aluria/hw-health-charm/+git/hw-health-charm:lint-test-actions into hw-health-charm:master.

Requested reviews:
  Nagios Charm developers (nagios-charmers)

For more details, see:
https://code.launchpad.net/~aluria/hw-health-charm/+git/hw-health-charm/+merge/375319
-- 
Your team Nagios Charm developers is requested to review the proposed merge of ~aluria/hw-health-charm/+git/hw-health-charm:lint-test-actions into hw-health-charm:master.
diff --git a/src/tests/unit/test_actions.py b/src/tests/unit/test_actions.py
index 33c67c8..c0ce829 100644
--- a/src/tests/unit/test_actions.py
+++ b/src/tests/unit/test_actions.py
@@ -117,10 +117,11 @@ class ShowSelTestCase(unittest.TestCase):
     @mock.patch('actions.actions.action_get')
     @mock.patch('subprocess.check_output')
     def test_subprocess_error(self, mock_check_output, mock_action_get, mock_action_fail):
-        show_all_flag = False
-        mock_action_get.return_value = show_all_flag
         def raise_error(*args, **kwargs):
             raise subprocess.CalledProcessError(1, ['bogus-cmd'])
+
+        show_all_flag = False
+        mock_action_get.return_value = show_all_flag
         mock_check_output.side_effect = raise_error
         show_sel()
         self.assertEqual(

Follow ups