diff --git a/awx/main/tests/organizations.py b/awx/main/tests/organizations.py index 0ee735a2ca..931f784496 100644 --- a/awx/main/tests/organizations.py +++ b/awx/main/tests/organizations.py @@ -286,7 +286,7 @@ class OrganizationsTest(BaseTest): self.assertEqual(users['count'], 2) # post a completely new user to verify we can add users to the subcollection directly - new_user = dict(username='NewUser9000') + new_user = dict(username='NewUser9000', password='NewPassword9000') which_org = self.normal_django_user.admin_of_organizations.all()[0] url = reverse('api:organization_users_list', args=(which_org.pk,)) self.post(url, new_user, expect=201, auth=self.get_normal_credentials()) diff --git a/awx/main/tests/projects.py b/awx/main/tests/projects.py index 3792db497b..0f3fecd771 100644 --- a/awx/main/tests/projects.py +++ b/awx/main/tests/projects.py @@ -419,11 +419,11 @@ class ProjectsTest(BaseTransactionTest): self.post(team_users, data=dict(x, is_superuser=False), expect=204, auth=self.get_normal_credentials()) # The normal admin user can't create a super user vicariously through the team/project - self.post(team_users, data=dict(username='attempted_superuser_create', is_superuser=True), - expect=403, auth=self.get_normal_credentials()) + self.post(team_users, data=dict(username='attempted_superuser_create', password='thepassword', + is_superuser=True), expect=403, auth=self.get_normal_credentials()) # ... but a superuser can - self.post(team_users, data=dict(username='attempted_superuser_create', is_superuser=True), - expect=201, auth=self.get_super_credentials()) + self.post(team_users, data=dict(username='attempted_superuser_create', password='thepassword', + is_superuser=True), expect=201, auth=self.get_super_credentials()) self.assertEqual(Team.objects.get(pk=team.pk).users.count(), 5)