From fd35c59fc1cffdb106229a8d1e85857a2e9ab3f5 Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Tue, 15 Apr 2014 18:02:14 -0400 Subject: [PATCH] Fixed escaping of " in test_make_sudo_cmd in TestUtils so that it passes as it should. Signed-off-by: Timothy Appnel --- test/units/TestUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/TestUtils.py b/test/units/TestUtils.py index 85564c96cc7..a0c9490b74a 100644 --- a/test/units/TestUtils.py +++ b/test/units/TestUtils.py @@ -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])