Adds image-delete functionality.

Change-Id: Ic10433f6eb484a4760f3e61f040e903e86b95d91
This commit is contained in:
Anita Kuno
2013-01-25 20:54:21 +00:00
parent a5f996ce9b
commit a6ef8ed7da
3 changed files with 27 additions and 0 deletions
+17
View File
@@ -73,6 +73,14 @@ fixtures = {
},
),
},
'v2/images/87b634c1-f893-33c9-28a9-e5673c99239a': {
'DELETE': (
{},
{
'id': '87b634c1-f893-33c9-28a9-e5673c99239a',
},
),
},
'/v2/images/5cc4bebc-db27-11e1-a1eb-080027cbe205/file': {
'GET': (
{},
@@ -129,6 +137,15 @@ class TestController(testtools.TestCase):
self.assertEqual(image.id, '3a4560a1-e585-443e-9b39-553b46ec92d1')
self.assertEqual(image.name, 'image-1')
def test_delete_image(self):
self.controller.delete('87b634c1-f893-33c9-28a9-e5673c99239a')
expect = [
('DELETE',
'v2/images/87b634c1-f893-33c9-28a9-e5673c99239a',
{},
None)]
self.assertEqual(self.api.calls, expect)
def test_data_without_checksum(self):
body = self.controller.data('5cc4bebc-db27-11e1-a1eb-080027cbe205',
do_checksum=False)