From 04dd95bef7e88c2602cca74d542654ec7bdfc754 Mon Sep 17 00:00:00 2001 From: ling-yun Date: Fri, 24 Jan 2014 14:41:11 +0800 Subject: [PATCH] Fix docstring and remove unused variable Fix error docstring and remove unused variable 'volume ' in VolumeTransferTestCase. Change-Id: I6c98af30df88b8f19c23ef5e38e4b5b2eef7436c Closes-Bug: #1272182 --- cinder/tests/test_volume_transfer.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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'], -- 2.45.2