def test_result_sudo_error(self): """An Ansible result that is a sudo error.""" self.assertTrue(process.is_sudo_error_value( ansible_result(process.SUDO_ERROR)))
def test_result_not_error(self): """An Ansible result that is not a sudo error.""" self.assertFalse(process.is_sudo_error_value(ansible_result('foo')))
def test_list_sudo_error(self): """A list with the sudo error.""" self.assertTrue(process.is_sudo_error_value([process.SUDO_ERROR]))
def test_list_not_error(self): """A list that is not a sudo error.""" self.assertFalse(process.is_sudo_error_value(['foo']))
def test_string_sudo_error(self): """A string with the sudo error value.""" self.assertTrue(process.is_sudo_error_value(process.SUDO_ERROR))
def test_string_not_error(self): """A string that is not a sudo error.""" self.assertFalse(process.is_sudo_error_value('foo'))