mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
remove tests pertaining to credential org related field
This commit is contained in:
parent
4b5e131362
commit
81cb57be4f
@ -339,39 +339,6 @@ def test_list_created_org_credentials(post, get, organization, org_admin, org_me
|
|||||||
assert response.data['count'] == 0
|
assert response.data['count'] == 0
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
|
||||||
def test_cant_change_organization(patch, credential, organization, org_admin):
|
|
||||||
credential.organization = organization
|
|
||||||
credential.save()
|
|
||||||
|
|
||||||
response = patch(reverse('api:credential_detail', args=(credential.id,)), {
|
|
||||||
'name': 'Some new name',
|
|
||||||
}, org_admin)
|
|
||||||
assert response.status_code == 200
|
|
||||||
|
|
||||||
response = patch(reverse('api:credential_detail', args=(credential.id,)), {
|
|
||||||
'name': 'Some new name2',
|
|
||||||
'organization': organization.id, # fine for it to be the same
|
|
||||||
}, org_admin)
|
|
||||||
assert response.status_code == 200
|
|
||||||
|
|
||||||
response = patch(reverse('api:credential_detail', args=(credential.id,)), {
|
|
||||||
'name': 'Some new name3',
|
|
||||||
'organization': None
|
|
||||||
}, org_admin)
|
|
||||||
assert response.status_code == 403
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
|
||||||
def test_cant_add_organization(patch, credential, organization, org_admin):
|
|
||||||
assert credential.organization is None
|
|
||||||
response = patch(reverse('api:credential_detail', args=(credential.id,)), {
|
|
||||||
'name': 'Some new name',
|
|
||||||
'organization': organization.id
|
|
||||||
}, org_admin)
|
|
||||||
assert response.status_code == 403
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Openstack Credentials
|
# Openstack Credentials
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user