def test_with_helper(self):
    expected = ('ls %s\n' % self.test_file)
    self.mock_popen.return_value = [expected, '']
    self.config(group='AGENT', root_helper='echo')
    result = utils.execute(['ls', self.test_file], run_as_root=True)
    self.assertEqual(result, expected)
def test_with_helper(self):
    expected = ('ls %s\n' % self.test_file)
    self.mock_popen.return_value = [expected, ]
    self.config(group='AGENT', root_helper='echo')
    result = utils.execute(['ls', self.test_file], run_as_root=True)
    self.assertEqual(result, expected)