Exemplo n.º 1
0
 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)))
Exemplo n.º 2
0
 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')))
Exemplo n.º 3
0
 def test_list_sudo_error(self):
     """A list with the sudo error."""
     self.assertTrue(process.is_sudo_error_value([process.SUDO_ERROR]))
Exemplo n.º 4
0
 def test_list_not_error(self):
     """A list that is not a sudo error."""
     self.assertFalse(process.is_sudo_error_value(['foo']))
Exemplo n.º 5
0
 def test_string_sudo_error(self):
     """A string with the sudo error value."""
     self.assertTrue(process.is_sudo_error_value(process.SUDO_ERROR))
Exemplo n.º 6
0
 def test_string_not_error(self):
     """A string that is not a sudo error."""
     self.assertFalse(process.is_sudo_error_value('foo'))