How to use delete_inherited_role_from_user_on_domain method in tempest

Best Python code snippet using tempest_python

test_inherits.py

Source: test_inherits.py Github

copy

Full Screen

...68 (self.inherited_roles_client.69 check_user_inherited_project_role_on_domain(70 self.domain['id'], self.user['id'], src_role['id']))71 # Revoke role from domains user.72 self.inherited_roles_client.delete_inherited_role_from_user_on_domain(73 self.domain['id'], self.user['id'], src_role['id'])74 @decorators.idempotent_id('c7a8dda2-be50-4fb4-9a9c-e830771078b1')75 def test_inherit_assign_list_check_revoke_roles_on_domains_group(self):76 # Create role77 src_role = self.setup_test_role()78 # Assign role on domains group79 self.inherited_roles_client.create_inherited_role_on_domains_group(80 self.domain['id'], self.group['id'], src_role['id'])81 # List role on domains group82 roles = self.inherited_roles_client.\83 list_inherited_project_role_for_group_on_domain(84 self.domain['id'], self.group['id'])['roles']85 fetched_role_ids = [i['id'] for i in roles]86 self._list_assertions(roles, fetched_role_ids,87 src_role['id'])88 # Check role on domains group89 (self.inherited_roles_client.90 check_group_inherited_project_role_on_domain(91 self.domain['id'], self.group['id'], src_role['id']))92 # Revoke role from domains group93 self.inherited_roles_client.delete_inherited_role_from_group_on_domain(94 self.domain['id'], self.group['id'], src_role['id'])95 @decorators.idempotent_id('18b70e45-7687-4b72-8277-b8f1a47d7591')96 def test_inherit_assign_check_revoke_roles_on_projects_user(self):97 # Create role98 src_role = self.setup_test_role()99 # Assign role on projects user100 self.inherited_roles_client.create_inherited_role_on_projects_user(101 self.project['id'], self.user['id'], src_role['id'])102 # Check role on projects user103 (self.inherited_roles_client.104 check_user_has_flag_on_inherited_to_project(105 self.project['id'], self.user['id'], src_role['id']))106 # Revoke role from projects user107 self.inherited_roles_client.delete_inherited_role_from_user_on_project(108 self.project['id'], self.user['id'], src_role['id'])109 @decorators.idempotent_id('26021436-d5a4-4256-943c-ded01e0d4b45')110 def test_inherit_assign_check_revoke_roles_on_projects_group(self):111 # Create role112 src_role = self.setup_test_role()113 # Assign role on projects group114 self.inherited_roles_client.create_inherited_role_on_projects_group(115 self.project['id'], self.group['id'], src_role['id'])116 # Check role on projects group117 (self.inherited_roles_client.118 check_group_has_flag_on_inherited_to_project(119 self.project['id'], self.group['id'], src_role['id']))120 # Revoke role from projects group121 (self.inherited_roles_client.122 delete_inherited_role_from_group_on_project(123 self.project['id'], self.group['id'], src_role['id']))124 @decorators.idempotent_id('3acf666e-5354-42ac-8e17-8b68893bcd36')125 def test_inherit_assign_list_revoke_user_roles_on_domain(self):126 # Create role127 src_role = self.setup_test_role()128 # Create a project hierarchy129 leaf_project = self.setup_test_project(domain_id=self.domain['id'],130 parent_id=self.project['id'])131 # Assign role on domain132 self.inherited_roles_client.create_inherited_role_on_domains_user(133 self.domain['id'], self.user['id'], src_role['id'])134 # List "effective" role assignments from user on the parent project135 params = {'scope.project.id': self.project['id'],136 'user.id': self.user['id']}137 assignments = self.role_assignments.list_role_assignments(138 effective=True, **params)['role_assignments']139 self.assertNotEmpty(assignments)140 # List "effective" role assignments from user on the leaf project141 params['scope.project.id'] = leaf_project['id']142 assignments = self.role_assignments.list_role_assignments(143 effective=True, **params)['role_assignments']144 self.assertNotEmpty(assignments)145 # Revoke role from domain146 self.inherited_roles_client.delete_inherited_role_from_user_on_domain(147 self.domain['id'], self.user['id'], src_role['id'])148 # List "effective" role assignments from user on the parent project149 # should return an empty list150 params['scope.project.id'] = self.project['id']151 assignments = self.role_assignments.list_role_assignments(152 effective=True, **params)['role_assignments']153 self.assertEmpty(assignments)154 # List "effective" role assignments from user on the leaf project155 # should return an empty list156 params['scope.project.id'] = leaf_project['id']157 assignments = self.role_assignments.list_role_assignments(158 effective=True, **params)['role_assignments']159 self.assertEmpty(assignments)160 @decorators.idempotent_id('9f02ccd9-9b57-46b4-8f77-dd5a736f3a06')...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Rebuild Confidence in Your Test Automation

These days, development teams depend heavily on feedback from automated tests to evaluate the quality of the system they are working on.

What will come after “agile”?

I think that probably most development teams describe themselves as being “agile” and probably most development teams have standups, and meetings called retrospectives.There is also a lot of discussion about “agile”, much written about “agile”, and there are many presentations about “agile”. A question that is often asked is what comes after “agile”? Many testers work in “agile” teams so this question matters to us.

Test strategy and how to communicate it

I routinely come across test strategy documents when working with customers. They are lengthy—100 pages or more—and packed with monotonous text that is routinely reused from one project to another. Yawn once more— the test halt and resume circumstances, the defect management procedure, entrance and exit criteria, unnecessary generic risks, and in fact, one often-used model replicates the requirements of textbook testing, from stress to systems integration.

Do you possess the necessary characteristics to adopt an Agile testing mindset?

To understand the agile testing mindset, we first need to determine what makes a team “agile.” To me, an agile team continually focuses on becoming self-organized and cross-functional to be able to complete any challenge they may face during a project.

How To Refresh Page Using Selenium C# [Complete Tutorial]

When working on web automation with Selenium, I encountered scenarios where I needed to refresh pages from time to time. When does this happen? One scenario is that I needed to refresh the page to check that the data I expected to see was still available even after refreshing. Another possibility is to clear form data without going through each input individually.

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