Skip to content

Commit 5601b74

Browse files
committed
fix tests
1 parent baae21e commit 5601b74

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

folium/templates/fol_template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
var {{tile['id']}} = L.tileLayer(
6464
'{{tile['address']}}',
6565
{
66-
maxZoom: {{tile['max_zoom']}},
67-
minZoom: {{tile['min_zoom']}},
68-
noWrap: {{tile['no_wrap'].__str__().lower()}},
69-
attribution: '{{tile['attr']}}',
70-
detectRetina: {{tile['detect_retina'].__str__().lower()}},
71-
subdomains: '{{tile['subdomains']}}'
66+
"attribution": "{{tile['attr']}}",
67+
"detectRetina": {{tile['detect_retina'].__str__().lower()}},
68+
"maxZoom": {{tile['max_zoom']}},
69+
"minZoom": {{tile['min_zoom']}},
70+
"noWrap": {{tile['no_wrap'].__str__().lower()}},
71+
"subdomains": "{{tile['subdomains']}}"
7272
}).addTo({{ map_id }});
7373
{% endfor %}
7474
</script>

tests/test_folium.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ def setup(self):
7272
"""Setup Folium Map."""
7373
with mock.patch('branca.element.uuid4') as uuid4:
7474
uuid4().hex = '0' * 32
75+
attr = 'http://openstreetmap.org'
7576
self.m = folium.Map(
7677
location=[45.5236, -122.6750],
7778
width=900,
7879
height=400,
7980
max_zoom=20,
8081
zoom_start=4,
81-
max_bounds=True
82+
max_bounds=True,
83+
attr=attr
8284
)
8385
self.env = Environment(loader=PackageLoader('folium', 'templates'))
8486

@@ -309,9 +311,7 @@ def test_map_build(self):
309311
self.setup()
310312
out = self.m._parent.render()
311313
html_templ = self.env.get_template('fol_template.html')
312-
attr = ('Data by <a href="http://openstreetmap.org">OpenStreetMap'
313-
'</a>,under '
314-
'<a href="http://www.openstreetmap.org/copyright">ODbL</a>.')
314+
attr = 'http://openstreetmap.org'
315315
tile_layers = [
316316
{'id': 'tile_layer_'+'0'*32,
317317
'address': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',

0 commit comments

Comments
 (0)