How to use test_cfn_handle_iam_role_resource method in localstack

Best Python code snippet using localstack_python

test_cloudformation.py

Source:test_cloudformation.py Github

copy

Full Screen

...987 rs = kinesis_client.list_streams()988 self.assertNotIn(kinesis_stream_name, rs['StreamNames'])989 rs = firehose_client.list_delivery_streams()990 self.assertNotIn(firehose_stream_name, rs['DeliveryStreamNames'])991 def test_cfn_handle_iam_role_resource(self):992 stack_name = 'stack-%s' % short_uid()993 role_name = 'role-%s' % short_uid()994 role_path_prefix = '/role-prefix-%s/' % short_uid()995 deploy_cf_stack(stack_name=stack_name, template_body=TEST_TEMPLATE_13 % (role_name, role_path_prefix))996 cfn = aws_stack.connect_to_service('cloudformation')997 iam = aws_stack.connect_to_service('iam')998 rs = iam.list_roles(999 PathPrefix=role_path_prefix1000 )1001 self.assertEqual(len(rs['Roles']), 1)1002 role = rs['Roles'][0]1003 self.assertEqual(role['RoleName'], role_name)1004 cfn.delete_stack(StackName=stack_name)1005 rs = iam.list_roles(...

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