AC-1116 Support for deleting project/inventory updates.

This commit is contained in:
Chris Church
2014-04-01 17:15:37 -04:00
parent 4069a33ab0
commit 658581cce0
8 changed files with 47 additions and 10 deletions

View File

@@ -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')

View File

@@ -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',