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',
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'],
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')
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'],