

def test_region_set(self):
    parent_region_id = self._create_dummy_region()
    new_parent_region_id = self._create_dummy_region()
    region_id = self._create_dummy_region(parent_region_id)
    raw_output = self.openstack(('region show %s' % region_id))
    region = self.parse_show_as_object(raw_output)
    self.assertEqual(parent_region_id, region['parent_region'])
    self.assertEqual(region_id, region['region'])
    raw_output = self.openstack(('region set --parent-region %(parent_region)s %(region)s' % {
        'parent_region': new_parent_region_id,
        'region': region_id,
    }))
    self.assertEqual(0, len(raw_output))
    raw_output = self.openstack(('region show %s' % region_id))
    region = self.parse_show_as_object(raw_output)
    self.assertEqual(new_parent_region_id, region['parent_region'])
    self.assertEqual(raw_output, region['region'])

dataset/ETHPy150Open dtroyer/python-openstackclient/functional/tests/identity/v3/test_region.py RegionTests.test_region_set/VarMisuse@156/282 `region_id`->`raw_output`