How to use test_get_capabilities method in avocado

Best Python code snippet using avocado_python

test_capabilities.py

Source:test_capabilities.py Github

copy

Full Screen

...34 def setup_credentials(cls):35 super().setup_credentials()36 cls.os_primary = getattr(cls, 'os_%s' % cls.credentials[0])37 @abc.abstractmethod38 def test_get_capabilities(self):39 """Test volume_extension:capabilities policy.40 This test must check:41 * whether the persona can fetch capabilities for a host.42 """43 pass44class ProjectAdminTests(VolumeV3RbacCapabilityTests, base.BaseVolumeTest):45 credentials = ['project_admin', 'system_admin']46 @decorators.idempotent_id('1fdbe493-e58f-48bf-bb38-52003eeef8cb')47 def test_get_capabilities(self):48 pools = self.admin_stats_client.list_pools()['pools']49 host_name = pools[0]['name']50 self.do_request('show_backend_capabilities', expected_status=200,51 host=host_name)52class ProjectMemberTests(ProjectAdminTests, base.BaseVolumeTest):53 credentials = ['project_member', 'project_admin', 'system_admin']54 @decorators.idempotent_id('dbaf51de-fafa-4f55-875f-7537524489ab')55 def test_get_capabilities(self):56 pools = self.admin_stats_client.list_pools()['pools']57 host_name = pools[0]['name']58 self.do_request('show_backend_capabilities',59 expected_status=exceptions.Forbidden,60 host=host_name)61class ProjectReaderTests(ProjectMemberTests, base.BaseVolumeTest):...

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 avocado 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