def test_region_set(self):
        # prepare region with parent-region
        parent_region_id = self._create_dummy_region()
        new_parent_region_id = self._create_dummy_region()
        region_id = self._create_dummy_region(parent_region_id)
        # check region details
        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'])
        # update parent-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))
        # check updated region details
        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(region_id, region['region'])
dataset/ETHPy150Open dtroyer/python-openstackclient/functional/tests/identity/v3/test_region.py/RegionTests.test_region_set/original