Пример #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)))
Пример #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')))
Пример #3
0
 def test_list_sudo_error(self):
     """A list with the sudo error."""
     self.assertTrue(process.is_sudo_error_value([process.SUDO_ERROR]))
Пример #4
0
 def test_list_not_error(self):
     """A list that is not a sudo error."""
     self.assertFalse(process.is_sudo_error_value(['foo']))
Пример #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))
Пример #6
0
 def test_string_not_error(self):
     """A string that is not a sudo error."""
     self.assertFalse(process.is_sudo_error_value('foo'))