'Test exception handling when create snapshot in maintenance.'

def test_create_snapshot_failed_maintenance(self):

    test_volume = tests_utils.create_volume(self.context, status='maintenance', host=CONF.host)
    volume_api = cinder.volume.api.API()
    self.assertRaises(exception.InvalidVolume, volume_api.create_snapshot, self.context, test_volume, 'fake_name', 'fake_description')
