How to use list_access_token_roles method in tempest

Best Python code snippet using tempest_python

test_oauth_tokens_rbac.py

Source:test_oauth_tokens_rbac.py Github

copy

Full Screen

...96 self.oauth_token_client.list_access_tokens(self.user_id)97 @rbac_rule_validation.action(service="keystone",98 rules=["identity:list_access_token_roles"])99 @decorators.idempotent_id('0f148510-63bf-11e6-4522-080044d0d978')100 def test_list_access_token_roles(self):101 access_token = self._create_access_token()102 with self.override_role():103 self.oauth_token_client.list_access_token_roles(104 self.user_id, access_token)105 @rbac_rule_validation.action(service="keystone",106 rules=["identity:delete_access_token"])107 @decorators.idempotent_id('0f148510-63bf-11e6-4522-080044d0d981')108 def test_revoke_access_token(self):109 access_token = self._create_access_token()110 with self.override_role():111 self.oauth_token_client.revoke_access_token(...

Full Screen

Full Screen

access_token.py

Source:access_token.py Github

copy

Full Screen

1# Licensed under the Apache License, Version 2.0 (the "License"); you may2# not use this file except in compliance with the License. You may obtain3# a copy of the License at4#5# http://www.apache.org/licenses/LICENSE-2.06#7# Unless required by applicable law or agreed to in writing, software8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the10# License for the specific language governing permissions and limitations11# under the License.12from oslo_policy import policy13from keystone.common.policies import base14access_token_policies = [15 policy.RuleDefault(16 name=base.IDENTITY % 'authorize_request_token',17 check_str=base.RULE_ADMIN_REQUIRED),18 policy.RuleDefault(19 name=base.IDENTITY % 'get_access_token',20 check_str=base.RULE_ADMIN_REQUIRED),21 policy.RuleDefault(22 name=base.IDENTITY % 'get_access_token_role',23 check_str=base.RULE_ADMIN_REQUIRED),24 policy.RuleDefault(25 name=base.IDENTITY % 'list_access_tokens',26 check_str=base.RULE_ADMIN_REQUIRED),27 policy.RuleDefault(28 name=base.IDENTITY % 'list_access_token_roles',29 check_str=base.RULE_ADMIN_REQUIRED),30 policy.RuleDefault(31 name=base.IDENTITY % 'delete_access_token',32 check_str=base.RULE_ADMIN_REQUIRED)33]34def list_rules():...

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