Skip to content

Commit cecaf60

Browse files
committed
added test
1 parent 7624c02 commit cecaf60

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

plotly/tests/test_core/test_offline/test_offline.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ def test_autoresizing(self):
7979
for resize_code_string in resize_code_strings:
8080
self.assertTrue(resize_code_string not in html)
8181

82-
#def test_plot_rendered_if_non_plotly_domain(self):
83-
# plotly.tools.set_config_file(plotly_domain='https://stage.plot.ly',
84-
# plotly_api_domain='https://api-stage.plot.ly')
85-
86-
87-
82+
def test_plot_rendered_if_non_plotly_domain(self):
83+
plotly.tools.set_config_file(plotly_domain='https://stage.plot.ly',
84+
plotly_api_domain='https://api-stage.plot.ly')
8885

86+
html = plotly.offline.plot(fig, output_type='div')
87+
# test that 'Export to stage.plot.ly' is in the html
88+
self.assertTrue('Export to stage.plot.ly' in html)
89+
self.assertTrue('Export to plot.ly' not in html)

0 commit comments

Comments
 (0)