Ejemplo n.º 1
0
 def test_execute_get_root_helper(self):
     with mock.patch.object(
             processutils, 'execute', autospec=True) as execute_mock:
         helper = utils._get_root_helper()
         utils.execute('foo', run_as_root=True)
         execute_mock.assert_called_once_with('foo', run_as_root=True,
                                              root_helper=helper)
Ejemplo n.º 2
0
 def test_execute_get_root_helper(self):
     with mock.patch.object(
             processutils, 'execute', autospec=True) as execute_mock:
         helper = utils._get_root_helper()
         utils.execute('foo', run_as_root=True)
         execute_mock.assert_called_once_with('foo', run_as_root=True,
                                              root_helper=helper)