mirror of
https://github.com/ansible/awx.git
synced 2026-06-30 10:58:03 -02:30
remove ability to add constructed inventories to constructed inventories
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
from awx.main.models import Inventory
|
||||
from awx.api.versioning import reverse
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_constructed_inventory_post(post, organization, admin_user):
|
||||
inventory1 = Inventory.objects.create(name='dummy1', kind='constructed', organization=organization)
|
||||
inventory2 = Inventory.objects.create(name='dummy2', kind='constructed', organization=organization)
|
||||
resp = post(
|
||||
url=reverse('api:inventory_input_inventories', kwargs={'pk': inventory1.id}),
|
||||
data={'id': inventory2.id},
|
||||
user=admin_user,
|
||||
expect=405,
|
||||
)
|
||||
print(resp)
|
||||
assert resp.status_code == 405
|
||||
Reference in New Issue
Block a user