From 736f86fc722e7e3db74947304403a7014c6d13db Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 3 Apr 2015 16:51:34 -0400 Subject: [PATCH] Last of the ad-hoc priv escalation unit test fixes --- awx/main/tests/ad_hoc.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/awx/main/tests/ad_hoc.py b/awx/main/tests/ad_hoc.py index aeadbed5c3..0ce22dc467 100644 --- a/awx/main/tests/ad_hoc.py +++ b/awx/main/tests/ad_hoc.py @@ -568,17 +568,10 @@ class AdHocCommandApiTest(BaseAdHocCommandTest): with self.current_user('admin'): response = self.post(url, data, expect=400) data.pop('forks') - data['privilege_escalation'] = 'telekinesis' - with self.current_user('admin'): - response = self.post(url, data, expect=400) - data['privilege_escalation'] = 'su' + data['become_enabled'] = True with self.current_user('admin'): response = self.post(url, data, expect=201) - self.assertEqual(response['privilege_escalation'], 'su') - data['privilege_escalation'] = 'sudo' - with self.current_user('admin'): - response = self.post(url, data, expect=201) - self.assertEqual(response['privilege_escalation'], 'sudo') + self.assertEqual(response['become_enabled'], True) def test_ad_hoc_command_detail(self): # Post to list to start a new ad hoc command.