mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-05 07:51:51 -05:00
AC-1116 Support for deleting project/inventory updates.
This commit is contained in:
@@ -1094,6 +1094,12 @@ class InventoryUpdatesTest(BaseTransactionTest):
|
||||
})
|
||||
response = self.put(inv_src_url2, data, expect=400)
|
||||
self.assertTrue('source' in response, response)
|
||||
# Make sure we can delete the inventory update.
|
||||
inv_up_url = reverse('api:inventory_update_detail', args=(inventory_update.pk,))
|
||||
with self.current_user(self.super_django_user):
|
||||
self.get(inv_up_url, expect=200)
|
||||
self.delete(inv_up_url, expect=204)
|
||||
self.get(inv_up_url, expect=404)
|
||||
|
||||
def test_put_inventory_source_detail_with_regions(self):
|
||||
creds_url = reverse('api:credential_list')
|
||||
|
||||
@@ -1160,6 +1160,11 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
||||
self.check_project_update(project, should_fail=True)#should_still_fail)
|
||||
else:
|
||||
self.check_project_update(project, should_fail=should_still_fail)
|
||||
# Test that we can delete project updates.
|
||||
for pu in project.project_updates.filter(active=True):
|
||||
pu_url = reverse('api:project_update_detail', args=(pu.pk,))
|
||||
with self.current_user(self.super_django_user):
|
||||
self.delete(pu_url, expect=204)
|
||||
|
||||
def test_create_project_with_scm(self):
|
||||
scm_url = getattr(settings, 'TEST_GIT_PUBLIC_HTTPS',
|
||||
|
||||
Reference in New Issue
Block a user