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))
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))
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))