diff --git a/awx/main/tests/functional/api/test_credential.py b/awx/main/tests/functional/api/test_credential.py index e594c95c1d..eb6391ba05 100644 --- a/awx/main/tests/functional/api/test_credential.py +++ b/awx/main/tests/functional/api/test_credential.py @@ -216,13 +216,16 @@ def test_openstack_create_fail_required_fields(post, organization, admin): # @pytest.mark.django_db -def test_create_credential_xfails(post, organization, team, admin): +def test_create_credential_missing_user_team_org_xfail(post, admin): # Must specify one of user, team, or organization response = post(reverse('api:credential_list'), { 'name': 'Some name', 'username': 'someusername', }, admin) assert response.status_code == 400 + +@pytest.mark.django_db +def test_create_credential_with_user_and_org_xfail(post, organization, admin): # Can only specify one of user, team, or organization response = post(reverse('api:credential_list'), { 'name': 'Some name', @@ -231,6 +234,9 @@ def test_create_credential_xfails(post, organization, team, admin): 'organization': organization.id, }, admin) assert response.status_code == 400 + +@pytest.mark.django_db +def test_create_credential_with_team_and_org_xfail(post, organization, team, admin): response = post(reverse('api:credential_list'), { 'name': 'Some name', 'username': 'someusername', @@ -238,6 +244,9 @@ def test_create_credential_xfails(post, organization, team, admin): 'team': team.id, }, admin) assert response.status_code == 400 + +@pytest.mark.django_db +def test_create_credential_with_user_and_team_xfail(post, team, admin): response = post(reverse('api:credential_list'), { 'name': 'Some name', 'username': 'someusername', @@ -245,7 +254,3 @@ def test_create_credential_xfails(post, organization, team, admin): 'team': team.id, }, admin) assert response.status_code == 400 - - - -