'Expect an error when the snapshot\'s status is not \'available\'.'

def test_create_volume_from_snapshot_status_not_available(self):

    self._set_driver()
    drv = self._driver
    src_volume = self._simple_volume()
    fake_snap = fake_snapshot.fake_snapshot_obj(self.context)
    fake_snap.volume = src_volume
    new_volume = self._simple_volume()
    new_volume['size'] = fake_snap['volume_size']
    self.assertRaises(exception.InvalidSnapshot, drv.create_volume_from_snapshot, new_volume, fake_snap)
