示例#1
0
 def test_selective_eval_evaluates(self):
     """
     Given string representing a function, evaluate
     """
     s = "{'Ref': 'AWS::StackId'}"
     expected = dict(Ref="AWS::StackId")
     self.assertEquals(expected, _selective_eval(s))
示例#2
0
 def test_selective_eval_evaluates(self):
     """
     Given string representing a function, evaluate
     """
     s = "{'Ref': 'AWS::StackId'}"
     expected = dict(Ref='AWS::StackId')
     self.assertEquals(expected, _selective_eval(s))
示例#3
0
 def test_selective_eval_noeval(self):
     """
     Assert selective eval returns s if s is not a function 'atom'
     """
     s = "this is embedded {'Ref': 'AWS::StackId'} in string"
     self.assertEquals(s, _selective_eval(s))
示例#4
0
 def test_selective_eval_noeval(self):
     """
     Assert selective eval returns s if s is not a function 'atom'
     """
     s = "this is embedded {'Ref': 'AWS::StackId'} in string"
     self.assertEquals(s, _selective_eval(s))