def test_qmark_expansion(self):
     self.assertTrue(_matches_after_expansion(
         'test-1',
         'test-?',
         None,
     ))
     self.assertFalse(_matches_after_expansion(
         'test1',
         'test-?',
         None,
     ))
 def test_asterisk_expansion(self):
     self.assertTrue(_matches_after_expansion(
         'test-123',
         'test*',
         None,
     ))
     self.assertTrue(_matches_after_expansion(
         'test',
         'test*',
         None,
     ))
     self.assertFalse(_matches_after_expansion(
         'tset',
         'test*',
         None,
     ))
Example #3
0
 def test_var_expansion(self):
     self.assertTrue(
         _matches_after_expansion(
             'arn:aws:iam::000000000000:user/test',
             'arn:aws:iam::000000000000:user/${aws:username}',
             {'aws:username': '******'}, True))
Example #4
0
 def test_var_expansion(self):
     self.assertTrue(_matches_after_expansion(
         'arn:aws:iam::000000000000:user/test',
         'arn:aws:iam::000000000000:user/${aws:username}',
         CaseInsensitiveDict({'aws:username': '******'})
     ))