Skip to content

Commit

Permalink
Add assert to delete multiple test
Browse files Browse the repository at this point in the history
Make sure calls are made to delete both volumes. Also removed redundant
fields in v1 fake volume.

Closes-Bug: #1253142
Change-Id: I51078041c6d765f28edb155d44928286ee2b0dd6
  • Loading branch information
avishay-traeger committed Nov 28, 2013
1 parent 5aaa68f commit c33dd1b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cinderclient/tests/v1/fakes.py
Expand Up @@ -35,8 +35,6 @@ def _stub_volume(**kwargs):
"bootable": "false",
"availability_zone": "cinder",
"created_at": "2012-08-27T00:00:00.000000",
"display_description": None,
"display_name": None,
"id": '00000000-0000-0000-0000-000000000000',
"metadata": {},
"size": 1,
Expand Down
1 change: 1 addition & 0 deletions cinderclient/tests/v1/test_shell.py
Expand Up @@ -124,6 +124,7 @@ def test_delete_by_name(self):

def test_delete_multiple(self):
self.run_command('delete 1234 5678')
self.assert_called_anytime('DELETE', '/volumes/1234')
self.assert_called('DELETE', '/volumes/5678')

def test_backup(self):
Expand Down
1 change: 1 addition & 0 deletions cinderclient/tests/v2/test_shell.py
Expand Up @@ -102,6 +102,7 @@ def test_delete_by_name(self):

def test_delete_multiple(self):
self.run_command('delete 1234 5678')
self.assert_called_anytime('DELETE', '/volumes/1234')
self.assert_called('DELETE', '/volumes/5678')

def test_backup(self):
Expand Down
1 change: 1 addition & 0 deletions doc/source/index.rst
Expand Up @@ -33,6 +33,7 @@ MASTER
------
.. _1254951: http://bugs.launchpad.net/python-cinderclient/+bug/1254951
.. _1254587: http://bugs.launchpad.net/python-cinderclient/+bug/1254587
.. _1253142: http://bugs.launchpad.net/python-cinderclient/+bug/1253142

1.0.7
-----
Expand Down

0 comments on commit c33dd1b

Please sign in to comment.