How to use test_basic_meta_def_resource_type_association method in tempest

Best Python code snippet using tempest_python

test_images_metadefs_resource_types.py

Source:test_images_metadefs_resource_types.py Github

copy

Full Screen

...16from tempest.lib import decorators17class MetadataResourceTypesTest(base.BaseV2ImageTest):18 """Test the Metadata definition resource types basic functionality"""19 @decorators.idempotent_id('6f358a4e-5ef0-11e6-a795-080027d0d606')20 def test_basic_meta_def_resource_type_association(self):21 # Get the available resource types and use one resource_type22 body = self.resource_types_client.list_resource_types()23 resource_name = body['resource_types'][0]['name']24 # Create a namespace25 namespace = self.create_namespace()26 # Create resource type association27 body = self.resource_types_client.create_resource_type_association(28 namespace['namespace'], name=resource_name)29 self.assertEqual(body['name'], resource_name)30 # NOTE(raiesmh08): Here intentionally I have not added addcleanup31 # method for resource type dissociation because its a metadata add and32 # being cleaned as soon as namespace is cleaned at test case level.33 # When namespace cleans, resource type association will automatically34 # clean without any error or dependency....

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful