File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 21
21
from six import PY3
22
22
import branca .element
23
23
24
- import requests
25
-
26
24
import folium
27
25
from folium .map import Popup , Marker , FitBounds , FeatureGroup
28
26
from folium .features import TopoJson , RectangleMarker , PolygonMarker
29
27
30
28
rootpath = os .path .abspath (os .path .dirname (__file__ ))
31
29
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' ])
32
35
33
36
def setup_data ():
34
37
"""Import economic data for testing."""
@@ -456,8 +459,7 @@ def test_json_request(self):
456
459
self .map = folium .Map (zoom_start = 4 )
457
460
458
461
# 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 ,
461
463
smooth_factor = 0.5 )
462
464
463
465
self .map ._parent .render ()
You can’t perform that action at this time.
0 commit comments