From: ling-yun Date: Fri, 24 Jan 2014 06:41:11 +0000 (+0800) Subject: Fix docstring and remove unused variable X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=04dd95bef7e88c2602cca74d542654ec7bdfc754;p=openstack-build%2Fcinder-build.git Fix docstring and remove unused variable Fix error docstring and remove unused variable 'volume ' in VolumeTransferTestCase. Change-Id: I6c98af30df88b8f19c23ef5e38e4b5b2eef7436c Closes-Bug: #1272182 --- diff --git a/cinder/tests/test_volume_transfer.py b/cinder/tests/test_volume_transfer.py index c794a49eb..a08305c6b 100644 --- a/cinder/tests/test_volume_transfer.py +++ b/cinder/tests/test_volume_transfer.py @@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__) class VolumeTransferTestCase(test.TestCase): - """Test cases for volume type code.""" + """Test cases for volume transfer code.""" def setUp(self): super(VolumeTransferTestCase, self).setUp() self.ctxt = context.RequestContext(user_id='user_id', @@ -37,8 +37,8 @@ class VolumeTransferTestCase(test.TestCase): def test_transfer_volume_create_delete(self): tx_api = transfer_api.API() - volume = utils.create_volume(self.ctxt, id='1', - updated_at=self.updated_at) + utils.create_volume(self.ctxt, id='1', + updated_at=self.updated_at) response = tx_api.create(self.ctxt, '1', 'Description') volume = db.volume_get(self.ctxt, '1') self.assertEqual('awaiting-transfer', volume['status'], @@ -50,8 +50,8 @@ class VolumeTransferTestCase(test.TestCase): def test_transfer_invalid_volume(self): tx_api = transfer_api.API() - volume = utils.create_volume(self.ctxt, id='1', status='in-use', - updated_at=self.updated_at) + utils.create_volume(self.ctxt, id='1', status='in-use', + updated_at=self.updated_at) self.assertRaises(exception.InvalidVolume, tx_api.create, self.ctxt, '1', 'Description') @@ -60,8 +60,8 @@ class VolumeTransferTestCase(test.TestCase): def test_transfer_accept(self): tx_api = transfer_api.API() - volume = utils.create_volume(self.ctxt, id='1', - updated_at=self.updated_at) + utils.create_volume(self.ctxt, id='1', + updated_at=self.updated_at) transfer = tx_api.create(self.ctxt, '1', 'Description') volume = db.volume_get(self.ctxt, '1') self.assertEqual('awaiting-transfer', volume['status'],