'Test volume can be extended at API level.'

def test_extend_volume_driver_not_initialized(self):

    fake_reservations = ['RESERVATION']
    volume = tests_utils.create_volume(self.context, size=2, status='available', host=CONF.host)
    self.volume.create_volume(self.context, volume)
    self.volume.driver._initialized = False
    self.assertRaises(exception.DriverNotInitialized, self.volume.extend_volume, self.context, volume, 3, fake_reservations)
    volume.refresh()
    self.assertEqual('error_extending', volume.status)
    self.volume.driver._initialized = True
    self.volume.delete_volume(self.context, volume)
