Commit 8d060685 by Michael DeHaan

Merge pull request #7007 from tima/test-sudo-cmd-esc

Fixed escaping of " in test_make_sudo_cmd in TestUtils so that it passes as it should.
parents a12231fa fd35c59f
......@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment