]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix docstring and remove unused variable
authorling-yun <zengyunling@huawei.com>
Fri, 24 Jan 2014 06:41:11 +0000 (14:41 +0800)
committerling-yun <zengyunling@huawei.com>
Fri, 24 Jan 2014 08:12:32 +0000 (16:12 +0800)
Fix error docstring and remove unused variable 'volume ' in
VolumeTransferTestCase.

Change-Id: I6c98af30df88b8f19c23ef5e38e4b5b2eef7436c
Closes-Bug: #1272182

cinder/tests/test_volume_transfer.py

index c794a49eb8d44c43c3327b342b6955bdce7b0111..a08305c6b364c3849d84398d00d600b7cc8b3832 100644 (file)
@@ -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'],