MCPcopy Create free account
hub / github.com/python-visualization/folium / test_wms

Function test_wms

tests/test_raster_layers.py:54–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53
54def test_wms():
55 m = folium.Map([40, -100], zoom_start=4)
56 url = "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi"
57 w = folium.raster_layers.WmsTileLayer(
58 url=url,
59 name="test",
60 fmt="image/png",
61 layers="nexrad-n0r-900913",
62 attr="Weather data © 2012 IEM Nexrad",
63 transparent=True,
64 cql_filter="something",
65 )
66 w.add_to(m)
67 html = m.get_root().render()
68
69 # verify this special case wasn't converted to lowerCamelCase
70 assert '"cql_filter": "something",' in html
71 assert "cqlFilter" not in html
72
73 bounds = m.get_bounds()
74 assert bounds == [[None, None], [None, None]], bounds
75
76
77def test_image_overlay():

Callers

nothing calls this directly

Calls 3

add_toMethod · 0.80
get_boundsMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…