From 174de1161bf576cacfc3133e0d19902f77d91c09 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 28 Oct 2015 02:36:09 -0400 Subject: [PATCH] fixed removing -n in password sudo tests --- test/units/playbook/test_play_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/playbook/test_play_context.py b/test/units/playbook/test_play_context.py index 57a6c7f506..0595966f1b 100644 --- a/test/units/playbook/test_play_context.py +++ b/test/units/playbook/test_play_context.py @@ -142,7 +142,7 @@ class TestPlayContext(unittest.TestCase): self.assertEqual(cmd, """%s -c '%s %s -u %s %s -c '"'"'echo %s; %s'"'"''""" % (default_exe, sudo_exe, sudo_flags, play_context.become_user, default_exe, play_context.success_key, default_cmd)) play_context.become_pass = 'testpass' cmd = play_context.make_become_cmd(cmd=default_cmd, executable=default_exe) - self.assertEqual(cmd, """%s -c '%s %s -p "%s" -u %s %s -c '"'"'echo %s; %s'"'"''""" % (default_exe, sudo_exe, sudo_flags, play_context.prompt, play_context.become_user, default_exe, play_context.success_key, default_cmd)) + self.assertEqual(cmd, """%s -c '%s %s -p "%s" -u %s %s -c '"'"'echo %s; %s'"'"''""" % (default_exe, sudo_exe, sudo_flags.replace('-n',''), play_context.prompt, play_context.become_user, default_exe, play_context.success_key, default_cmd)) play_context.become_pass = None