Skip to content

Commit 16044e3

Browse files
committed
Merge pull request #123 from plotly/andrew-fix-tests
Currently, username matches are case SENSITIVE (not sure why).
2 parents 1f5edc9 + 1e2679f commit 16044e3

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

Diff for: plotly/tests/test_core/test_get_figure/test_get_figure.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ def is_trivial(obj):
9191

9292

9393
def test_get_figure():
94-
un = 'plotlyimagetest'
94+
un = 'PlotlyImageTest'
9595
ak = '786r5mecv0'
9696
file_id = 2
9797
py.sign_in(un, ak)
9898
print("getting: https://plot.ly/~{0}/{1}/".format(un, file_id))
9999
print("###########################################\n\n")
100-
fig = py.get_figure('plotlyimagetest', str(file_id))
100+
fig = py.get_figure('PlotlyImageTest', str(file_id))
101101

102102

103103
def test_get_figure_with_url():
104-
un = 'plotlyimagetest'
104+
un = 'PlotlyImageTest'
105105
ak = '786r5mecv0'
106106
url = "https://plot.ly/~PlotlyImageTest/2/"
107107
py.sign_in(un, ak)
@@ -112,7 +112,7 @@ def test_get_figure_with_url():
112112

113113
@raises(exceptions.PlotlyError)
114114
def test_get_figure_invalid_1():
115-
un = 'plotlyimagetest'
115+
un = 'PlotlyImageTest'
116116
ak = '786r5mecv0'
117117
url = "https://plot.ly/~PlotlyImageTest/a/"
118118
py.sign_in(un, ak)
@@ -123,7 +123,7 @@ def test_get_figure_invalid_1():
123123

124124
@raises(exceptions.PlotlyError)
125125
def test_get_figure_invalid_2():
126-
un = 'plotlyimagetest'
126+
un = 'PlotlyImageTest'
127127
ak = '786r5mecv0'
128128
url = "https://plot.ly/~PlotlyImageTest/-1/"
129129
py.sign_in(un, ak)
@@ -134,7 +134,7 @@ def test_get_figure_invalid_2():
134134

135135
@raises(exceptions.PlotlyError)
136136
def test_get_figure_does_not_exist():
137-
un = 'plotlyimagetest'
137+
un = 'PlotlyImageTest'
138138
ak = '786r5mecv0'
139139
url = "https://plot.ly/~PlotlyImageTest/1000000000/"
140140
py.sign_in(un, ak)
@@ -144,17 +144,17 @@ def test_get_figure_does_not_exist():
144144

145145

146146
def test_get_figure_raw():
147-
un = 'plotlyimagetest'
147+
un = 'PlotlyImageTest'
148148
ak = '786r5mecv0'
149149
file_id = 2
150150
py.sign_in(un, ak)
151151
print("getting: https://plot.ly/~{0}/{1}/".format(un, file_id))
152152
print("###########################################\n\n")
153-
fig = py.get_figure('plotlyimagetest', str(file_id), raw=True)
153+
fig = py.get_figure('PlotlyImageTest', str(file_id), raw=True)
154154

155155

156156
def test_all():
157-
un = 'plotlyimagetest'
157+
un = 'PlotlyImageTest'
158158
ak = '786r5mecv0'
159159
run_test = False
160160
end_file = 2
@@ -173,8 +173,8 @@ def test_all():
173173
try:
174174
print("testing: https://plot.ly/~{0}/{1}".format(un, file_id))
175175
print("###########################################\n\n")
176-
fig = py.get_figure('plotlyimagetest', str(file_id))
177-
fig_raw = py.get_figure('plotlyimagetest',
176+
fig = py.get_figure('PlotlyImageTest', str(file_id))
177+
fig_raw = py.get_figure('PlotlyImageTest',
178178
str(file_id),
179179
raw=True)
180180
except exceptions.PlotlyError:

Diff for: plotly/tests/test_core/test_get_requests/test_get_requests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_user_does_not_exist():
4646

4747

4848
def test_file_does_not_exist():
49-
username = 'plotlyimagetest'
49+
username = 'PlotlyImageTest'
5050
api_key = '786r5mecv0'
5151
file_owner = 'get_test_user'
5252
file_id = 1000
@@ -67,7 +67,7 @@ def test_file_does_not_exist():
6767

6868

6969
def test_wrong_api_key(): # TODO: does this test the right thing?
70-
username = 'plotlyimagetest'
70+
username = 'PlotlyImageTest'
7171
api_key = 'invalid-apikey'
7272
file_owner = 'get_test_user'
7373
file_id = 0
@@ -84,7 +84,7 @@ def test_wrong_api_key(): # TODO: does this test the right thing?
8484
# TODO
8585

8686
def test_private_permission_defined():
87-
username = 'plotlyimagetest'
87+
username = 'PlotlyImageTest'
8888
api_key = '786r5mecv0'
8989
file_owner = 'get_test_user'
9090
file_id = 1 # 1 is a private file
@@ -124,7 +124,7 @@ def test_missing_headers():
124124

125125

126126
def test_valid_request():
127-
username = 'plotlyimagetest'
127+
username = 'PlotlyImageTest'
128128
api_key = '786r5mecv0'
129129
file_owner = 'get_test_user'
130130
file_id = 0

Diff for: plotly/tests/test_core/test_plotly/test_plot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
from plotly.exceptions import PlotlyError
1414

1515

16-
# username for tests: 'plotlyimagetest'
16+
# username for tests: 'PlotlyImageTest'
1717
# api_key for account: '786r5mecv0'
1818

1919

2020
def test_plot_valid():
21-
py.sign_in('plotlyimagetest', '786r5mecv0')
21+
py.sign_in('PlotlyImageTest', '786r5mecv0')
2222
fig = {
2323
'data':[
2424
{

Diff for: plotly/tests/test_core/test_stream/test_stream.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import plotly.plotly as py
1414
from plotly import exceptions
1515

16-
un = 'pythonapi'
16+
un = 'PythonAPI'
1717
ak = 'ubpiol2cve'
1818
tk = 'vaia8trjjb'
1919

Diff for: plotly/tests/test_optional/test_ipython/test_embed.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestPlotlyDisplay(unittest.TestCase):
1616

1717
def setUp(self):
18-
plot_info = {"un": "plotlyimagetest", "fid": "2"}
18+
plot_info = {"un": "PlotlyImageTest", "fid": "2"}
1919
url = "https://plot.ly/~{un}/{fid}".format(**plot_info)
2020
self.display_obj = tls.embed(url)
2121
self.results = {}

0 commit comments

Comments
 (0)