def test_add_sigmets(sigmets_json): kml = KMLGenerator() kml.add_folder('sigmets', pin=PIN_ORANGE) add_sigmets(kml, 'sigmets', sigmets_json) out = kml.render_folder('sigmets') assert out assert '#placemark-orange' in out assert '#sigmets' in out
def test_render_folder(self): kml = KMLGenerator(folder_template="{name} {open} {content}", point_template="{name} {color} {style}") kml.add_folder('aFolder') from editolido.geopoint import GeoPoint kml.add_point('aFolder', GeoPoint((0, 0), name="P1"), color="blouge", style='#mystyle') self.assertEqual(kml.render_folder('aFolder'), 'aFolder 1 P1 blouge #mystyle')