def test_get_solum_assembly(self):
        if base.config_set_as('camp_enabled', False):
            self.skipTest('CAMP not enabled.')

        # create an assembly using Solum
        p_resp = self.client.create_plan()
        self.assertEqual(201, p_resp.status)
        a_resp = self.client.create_assembly(plan_uuid=p_resp.uuid)
        self.assertEqual(201, a_resp.status)
        new_uuid = a_resp.uuid

        # try to get to the newly created assembly through the CAMP assemblies
        # resource. it would be more efficient to simply take the UUID of the
        # newly created resource and create a CAMP API URI
        # (../camp/v1_1/assemblies/<uuid>) from that, but we want to test that
        # a link to the Solum-created assembly appears in in the list of links
        # in the CAMP plans resource.
        resp, body = self.client.get('camp/v1_1/assemblies')
        self.assertEqual(200, resp.status, 'GET assemblies resource')

        # pick out the assemebly link for our new assembly uuid
        assemblies_dct = json.loads(body)
        camp_link = None
        for link in assemblies_dct['assembly_links']:
            link_uuid = link['href'].split("/")[-1]
            if link_uuid == new_uuid:
                camp_link = link

        msg = 'Unable to find link to newly created plan in CAMP plans'
        self.assertIsNotNone(camp_link, msg)

        url = camp_link['href'][len(self.client.base_url) + 1:]
        msg = ("GET Solum assembly resource for %s" %
               camp_link['target_name'])
        resp, body = self.client.get(url)
        self.assertEqual(200, resp.status, msg)

        assembly = json.loads(body)
        self.assertEqual('assembly', assembly['type'])
        self.assertEqual(base.assembly_sample_data['name'], assembly['name'])
Set up flags. Returns true if the flag settings are acceptable.
dataset/ETHPy150Open openstack/solum/functionaltests/api/camp/v1_1/test_assemblies.py/TestAssembliesController.test_get_solum_assembly--crossover with--dataset/ETHPy150Open everett-wetchler/okcupid/FetchProfiles.py/prepare_flags