handle short form function in cfn yaml template (#1103)

This commit is contained in:
Toshiya Kawasaki 2017-09-08 03:28:15 +09:00 committed by Jack Danger
commit 2f6f42a183
5 changed files with 172 additions and 4 deletions

View file

@ -9,7 +9,7 @@ from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel
from .parsing import ResourceMap, OutputMap
from .utils import generate_stack_id
from .utils import generate_stack_id, yaml_tag_constructor
from .exceptions import ValidationError
@ -74,6 +74,7 @@ class FakeStack(BaseModel):
))
def _parse_template(self):
yaml.add_multi_constructor('', yaml_tag_constructor)
try:
self.template_dict = yaml.load(self.template)
except yaml.parser.ParserError: