| 9 | |
| 10 | |
| 11 | def test_minimap(): |
| 12 | m = folium.Map(location=(30, 20), zoom_start=4) |
| 13 | |
| 14 | minimap = plugins.MiniMap() |
| 15 | m.add_child(minimap) |
| 16 | |
| 17 | out = normalize(m._parent.render()) |
| 18 | |
| 19 | # Verify that a new minimap is getting created. |
| 20 | assert "new L.Control.MiniMap" in out |
| 21 | |
| 22 | m = folium.Map(tiles=None, location=(30, 20), zoom_start=4) |
| 23 | minimap = plugins.MiniMap() |
| 24 | minimap.add_to(m) |
| 25 | |
| 26 | out = normalize(m._parent.render()) |
| 27 | # verify that tiles are being used |
| 28 | assert r"https://tile.openstreetmap.org" in out |