events: fix archive event pattern match check (#3671)

* events: fix archive event pattern match check

There is a missing `return True` for the positive match case in
matches_pattern, causing all valid patterns to fail.

* events: add test for valid, non-empty pattern match
This commit is contained in:
Emilio López 2021-02-16 05:54:28 -03:00 committed by GitHub
commit 5fd20626b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -287,6 +287,8 @@ class Archive(CloudFormationModel):
if event_value not in pattern_value:
return False
return True
def get_cfn_attribute(self, attribute_name):
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException