

def test_components_create(self):
    plan_resp = self.client.create_plan()
    self.assertEqual(plan_resp.status, 201)
    assembly_resp = self.client.create_assembly(plan_uuid=plan_resp.uuid)
    self.assertEqual(assembly_resp.status, 201)
    plan_uuid = plan_resp.uuid
    assembly_uuid = assembly_resp.uuid
    sample_data['assembly_uuid'] = assembly_uuid
    sample_data['plan_uri'] = ('%s/v1/plans/%s' % (plan_uuid.client.base_url, plan_uuid))
    sample_json = json.dumps(sample_data)
    (resp, body) = self.client.post('v1/components', sample_json)
    self.assertEqual(resp.status, 201)
    json_data = json.loads(body)
    self._assert_output_expected(json_data, sample_data)
    self._delete_component(json_data['uuid'])

dataset/ETHPy150Open openstack/solum/functionaltests/api/v1/test_component.py TestComponentController.test_components_create/VarMisuse@85/140 `self`->`plan_uuid`