1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixed escaping of " in test_make_sudo_cmd in TestUtils so that it passes

as it should.

Signed-off-by: Timothy Appnel <tim@appnel.com>
This commit is contained in:
Timothy Appnel 2014-04-15 18:02:14 -04:00
parent a12231fabe
commit fd35c59fc1

View file

@ -503,7 +503,7 @@ class TestUtils(unittest.TestCase):
self.assertTrue(isinstance(cmd, tuple))
self.assertEqual(len(cmd), 3)
self.assertTrue('-u root' in cmd[0])
self.assertTrue('-p "[sudo via ansible, key=' in cmd[0] and cmd[1].startswith('[sudo via ansible, key'))
self.assertTrue('-p \\"[sudo via ansible, key=' in cmd[0] and cmd[1].startswith('[sudo via ansible, key'))
self.assertTrue('echo SUDO-SUCCESS-' in cmd[0] and cmd[2].startswith('SUDO-SUCCESS-'))
self.assertTrue('sudo -k' in cmd[0])