'Test group create.'

@mock.patch('cinder.volume.utils.is_group_a_cg_snapshot_type')
def test_storwize_group_create_with_replication(self, is_grp_a_cg_snapshot_type):

    is_grp_a_cg_snapshot_type.side_effect = True
    spec = {'replication_enabled': '<is>    True', 'replication_type': '<in>    metro'}
    rep_type_ref = volume_types.create(self.ctxt, 'rep_type', spec)
    rep_group = testutils.create_group(self.ctxt, group_type_id=fake.GROUP_TYPE_ID, volume_type_ids=[rep_type_ref['id']])
    model_update = self.driver.create_group(self.ctxt, rep_group)
    self.assertEqual(fields.GroupStatus.ERROR, model_update['status'])
    self.assertFalse(is_grp_a_cg_snapshot_type.called)
