File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
packages/python/plotly/plotly/tests Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1212
1313import plotly
1414import plotly .io as pio
15+ from plotly .tests .utils import plotly_cdn_url
16+
1517import json
1618
1719packages_root = os .path .dirname (
3941 <script type="text/javascript">\
4042 window.PlotlyConfig = {MathJaxConfig: 'local'};</script>"""
4143
42- cdn_script = '<script src="https://cdn.plot.ly/plotly-latest.min.js">' " </script>"
44+ cdn_script = '<script src="{cdn_url}"> </script>' . format ( cdn_url = plotly_cdn_url ())
4345
4446directory_script = '<script src="plotly.min.js"></script>'
4547
Original file line number Diff line number Diff line change 1111import plotly .graph_objs as go
1212import plotly .io as pio
1313from plotly .offline import get_plotlyjs
14+ from plotly .tests .utils import plotly_cdn_url
1415
1516if sys .version_info >= (3 , 3 ):
1617 import unittest .mock as mock
@@ -135,7 +136,7 @@ def assert_not_full_html(html):
135136
136137
137138def assert_connected (html ):
138- assert "https://cdn.plot.ly/plotly-latest.min" in html
139+ assert plotly_cdn_url () in html
139140
140141
141142def assert_offline (html ):
@@ -306,7 +307,7 @@ def test_repr_html(renderer):
306307 template = (
307308 '<div> <script type="text/javascript">'
308309 "window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n "
309- '<script src="https://cdn.plot.ly/plotly-latest.min.js "></script> '
310+ '<script src="' + plotly_cdn_url () + ' "></script> '
310311 '<div id="cd462b94-79ce-42a2-887f-2650a761a144" class="plotly-graph-div" '
311312 'style="height:100%; width:100%;"></div> <script type="text/javascript">'
312313 " window.PLOTLYENV=window.PLOTLYENV || {};"
You can’t perform that action at this time.
0 commit comments