def test_parse_should_parse_all_known_resource_types(self): globals = Globals(self.template) parsed_globals = globals._parse(self.template["Globals"]) self.assertTrue("prefix_type1" in parsed_globals) self.assertEquals(self.template["Globals"]["type1"], parsed_globals["prefix_type1"].global_properties) self.assertTrue("prefix_type2" in parsed_globals) self.assertEquals(self.template["Globals"]["type2"], parsed_globals["prefix_type2"].global_properties)
def test_parse_should_not_error_if_value_is_empty(self): template = {"Globals": {"type1": {}}} # empty value globals = Globals(template) parsed = globals._parse(template["Globals"]) self.assertTrue("prefix_type1" in parsed) self.assertEqual({}, parsed["prefix_type1"].global_properties)
def test_parse_should_parse_all_known_resource_types(self): globals = Globals(self.template) parsed_globals = globals._parse(self.template["Globals"]) self.assertTrue("prefix_type1" in parsed_globals) self.assertEquals(self.template["Globals"]["type1"], parsed_globals["prefix_type1"].global_properties) self.assertTrue("prefix_type2" in parsed_globals) self.assertEquals(self.template["Globals"]["type2"], parsed_globals["prefix_type2"].global_properties)
def test_parse_should_not_error_if_value_is_empty(self): template = { "Globals": { "type1": {} # empty value } } globals = Globals(template) parsed = globals._parse(template["Globals"]) self.assertTrue("prefix_type1" in parsed) self.assertEquals({}, parsed["prefix_type1"].global_properties)