Skip to content

Commit c1b4d09

Browse files
committed
Add (failing) test for PY3 json decode error.
1 parent aa5482a commit c1b4d09

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

plotly/tests/test_core/test_get_figure/test_get_figure.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
from plotly.plotly import plotly as py
1010
from plotly import exceptions
1111
from nose.tools import raises
12+
import six
13+
import json
14+
15+
from unittest import TestCase
16+
from unittest import skipIf
1217

1318

1419
# username for tests: 'plotlyimagetest'
@@ -191,4 +196,14 @@ def test_all():
191196
"following output is produced...")
192197

193198

199+
class TestBytesVStrings(TestCase):
194200

201+
@skipIf(not six.PY3, 'Decoding and missing escapes is only seen in PY3')
202+
def test_proper_escaping(self):
203+
un = 'PlotlyImageTest'
204+
ak = '786r5mecv0'
205+
url = "https://plot.ly/~PlotlyImageTest/91/"
206+
py.sign_in(un, ak)
207+
print("getting: https://plot.ly/~PlotlyImageTest/91/")
208+
print("###########################################\n\n")
209+
fig = py.get_figure(url)

0 commit comments

Comments
 (0)