'Test volume creation with group & invalid volume type.'

def test_create_volume_with_group_invalid_type(self):

    vol_type = db.volume_type_create(context.get_admin_context(), dict(name=conf_fixture.def_vol_type, extra_specs={}))
    db_vol_type = db.volume_type_get(context.get_admin_context(), vol_type.id)
    grp = tests_utils.create_group(self.context, availability_zone=CONF.storage_availability_zone, status=fields.GroupStatus.AVAILABLE, volume_type_ids=[db_vol_type['id']], group_type_id=fake.GROUP_TYPE_ID, host=CONF.host)
    fake_type = fake_volume.fake_volume_type_obj(self.context, id=fake.VOLUME_TYPE_ID, name='fake')
    self.assertRaises(exception.InvalidInput, self.volume_api.create, self.context, 1, 'vol1', 'volume    1', group=grp)
    self.assertRaises(exception.InvalidInput, self.volume_api.create, self.context, 1, 'vol1', 'volume    1', volume_type=fake_type, group=grp)
