File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121from six import PY3
2222import branca .element
2323
24- import requests
25-
2624import folium
2725from folium .map import Popup , Marker , FitBounds , FeatureGroup
2826from folium .features import TopoJson , RectangleMarker , PolygonMarker
2927
3028rootpath = os .path .abspath (os .path .dirname (__file__ ))
3129
30+ # For testing remote requests
31+ remote_url = '/' .join ([
32+ 'https://raw.githubusercontent.com' ,
33+ 'python-visualization/folium/master' ,
34+ 'examples/data/us-states.json' ])
3235
3336def setup_data ():
3437 """Import economic data for testing."""
@@ -456,8 +459,7 @@ def test_json_request(self):
456459 self .map = folium .Map (zoom_start = 4 )
457460
458461 # Adding remote GeoJSON as additional layer.
459- path = 'https://raw.githubusercontent.com/python-visualization/folium/master/examples/data/us-states.json'
460- self .map .choropleth (geo_path = path ,
462+ self .map .choropleth (geo_path = remote_url ,
461463 smooth_factor = 0.5 )
462464
463465 self .map ._parent .render ()
You can’t perform that action at this time.
0 commit comments