Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f009eb8

Browse files
committed
test secret key accessibility at embedview, not shareplot
1 parent 07bc7b4 commit f009eb8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plotly/tests/test_core/test_plotly/test_plot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ def test_plot_url_response_given_sharing_key(self):
181181
'sharing': 'secret'}
182182

183183
plot_url = py.plot(self.simple_figure, **kwargs)
184-
response = requests.get(plot_url)
184+
# shareplot basically always gives a 200 if even if permission denied
185+
# embedplot returns an actual 404
186+
embed_url = plot_url.split('?')[0] + '.embed' + plot_url.split('?')[1]
187+
response = requests.get(embed_url)
188+
185189
self.assertEqual(response.status_code, 200)
186190

187191
@attr('slow')

0 commit comments

Comments
 (0)