mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 21:21:21 -03:30
Split up the credential xfail tests.
This commit is contained in:
parent
59361f5151
commit
c2285f1a4c
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user