From c2285f1a4c6f0627bd9bd5064f25f34cc7bd909f Mon Sep 17 00:00:00 2001 From: Chris Church Date: Fri, 17 Jun 2016 11:42:20 -0400 Subject: [PATCH] Split up the credential xfail tests. --- awx/main/tests/functional/api/test_credential.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 - - - -