コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
 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')
コード例 #4
0
 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')