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)
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)