'Expand volume test.'

@mock.patch.object(requests, 'request', FakeRequests)
def test_expand_volume(self):

    volume = {'name': 'test_volume_01', 'size': 10}
    volume2 = {'name': 'test_volume_02', 'size': 10}
    self.driver.create_volume(volume)
    self.assertRaises(exception.ZadaraVolumeNotFound, self.driver.extend_volume, volume2, 15)
    self.assertRaises(exception.InvalidInput, self.driver.extend_volume, volume, 5)
    self.driver.extend_volume(volume, 15)
    self.driver.delete_volume(volume)
