Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_desired_actions_from_statement(self):
result = _get_desired_actions_from_statement(dc(WILDCARD_POLICY_1['Statement'][0]))
self.assertEqual(result, set(EXPANDED_ACTIONS_1))
def test_get_desired_actions_from_statement_1(self):
statement = {
"Action": ["ec2:thispermissiondoesntexist"],
"Resource": "*",
"Effect": "Allow"
}
self.assertRaises(Exception, _get_desired_actions_from_statement, statement)