mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Fixing up some unit tests for "become" refactor
This commit is contained in:
parent
beac5c30d2
commit
e8d010533f
@ -396,7 +396,7 @@ class AdHocCommandApiTest(BaseAdHocCommandTest):
|
||||
self.assertEqual(response['limit'], '')
|
||||
self.assertEqual(response['forks'], 0)
|
||||
self.assertEqual(response['verbosity'], 0)
|
||||
self.assertEqual(response['privilege_escalation'], '')
|
||||
self.assertEqual(response['become_enabled'], False)
|
||||
self.put(url, data, expect=405)
|
||||
self.patch(url, data, expect=405)
|
||||
self.delete(url, expect=405)
|
||||
|
@ -546,13 +546,7 @@ class ProjectsTest(BaseTransactionTest):
|
||||
# Test with null where we expect a string value.
|
||||
with self.current_user(self.super_django_user):
|
||||
data = dict(name='zyx', user=self.super_django_user.pk, kind='ssh',
|
||||
sudo_username=None)
|
||||
self.post(url, data, expect=400)
|
||||
|
||||
# Test trying to pass both sudo_username and su_username.
|
||||
with self.current_user(self.super_django_user):
|
||||
data = dict(name='zyq', user=self.super_django_user.pk, kind='ssh',
|
||||
sudo_username='sudouser', su_username='suuser')
|
||||
become_username=None)
|
||||
self.post(url, data, expect=400)
|
||||
|
||||
# Test with encrypted ssh key and no unlock password.
|
||||
|
Loading…
Reference in New Issue
Block a user