Skip to content

Currently, username matches are case SENSITIVE (not sure why). #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions plotly/tests/test_core/test_get_figure/test_get_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ def is_trivial(obj):


def test_get_figure():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
file_id = 2
py.sign_in(un, ak)
print("getting: https://plot.ly/~{0}/{1}/".format(un, file_id))
print("###########################################\n\n")
fig = py.get_figure('plotlyimagetest', str(file_id))
fig = py.get_figure('PlotlyImageTest', str(file_id))


def test_get_figure_with_url():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
url = "https://plot.ly/~PlotlyImageTest/2/"
py.sign_in(un, ak)
Expand All @@ -112,7 +112,7 @@ def test_get_figure_with_url():

@raises(exceptions.PlotlyError)
def test_get_figure_invalid_1():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
url = "https://plot.ly/~PlotlyImageTest/a/"
py.sign_in(un, ak)
Expand All @@ -123,7 +123,7 @@ def test_get_figure_invalid_1():

@raises(exceptions.PlotlyError)
def test_get_figure_invalid_2():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
url = "https://plot.ly/~PlotlyImageTest/-1/"
py.sign_in(un, ak)
Expand All @@ -134,7 +134,7 @@ def test_get_figure_invalid_2():

@raises(exceptions.PlotlyError)
def test_get_figure_does_not_exist():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
url = "https://plot.ly/~PlotlyImageTest/1000000000/"
py.sign_in(un, ak)
Expand All @@ -144,17 +144,17 @@ def test_get_figure_does_not_exist():


def test_get_figure_raw():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
file_id = 2
py.sign_in(un, ak)
print("getting: https://plot.ly/~{0}/{1}/".format(un, file_id))
print("###########################################\n\n")
fig = py.get_figure('plotlyimagetest', str(file_id), raw=True)
fig = py.get_figure('PlotlyImageTest', str(file_id), raw=True)


def test_all():
un = 'plotlyimagetest'
un = 'PlotlyImageTest'
ak = '786r5mecv0'
run_test = False
end_file = 2
Expand All @@ -173,8 +173,8 @@ def test_all():
try:
print("testing: https://plot.ly/~{0}/{1}".format(un, file_id))
print("###########################################\n\n")
fig = py.get_figure('plotlyimagetest', str(file_id))
fig_raw = py.get_figure('plotlyimagetest',
fig = py.get_figure('PlotlyImageTest', str(file_id))
fig_raw = py.get_figure('PlotlyImageTest',
str(file_id),
raw=True)
except exceptions.PlotlyError:
Expand Down
8 changes: 4 additions & 4 deletions plotly/tests/test_core/test_get_requests/test_get_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_user_does_not_exist():


def test_file_does_not_exist():
username = 'plotlyimagetest'
username = 'PlotlyImageTest'
api_key = '786r5mecv0'
file_owner = 'get_test_user'
file_id = 1000
Expand All @@ -67,7 +67,7 @@ def test_file_does_not_exist():


def test_wrong_api_key(): # TODO: does this test the right thing?
username = 'plotlyimagetest'
username = 'PlotlyImageTest'
api_key = 'invalid-apikey'
file_owner = 'get_test_user'
file_id = 0
Expand All @@ -84,7 +84,7 @@ def test_wrong_api_key(): # TODO: does this test the right thing?
# TODO

def test_private_permission_defined():
username = 'plotlyimagetest'
username = 'PlotlyImageTest'
api_key = '786r5mecv0'
file_owner = 'get_test_user'
file_id = 1 # 1 is a private file
Expand Down Expand Up @@ -124,7 +124,7 @@ def test_missing_headers():


def test_valid_request():
username = 'plotlyimagetest'
username = 'PlotlyImageTest'
api_key = '786r5mecv0'
file_owner = 'get_test_user'
file_id = 0
Expand Down
4 changes: 2 additions & 2 deletions plotly/tests/test_core/test_plotly/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
from plotly.exceptions import PlotlyError


# username for tests: 'plotlyimagetest'
# username for tests: 'PlotlyImageTest'
# api_key for account: '786r5mecv0'


def test_plot_valid():
py.sign_in('plotlyimagetest', '786r5mecv0')
py.sign_in('PlotlyImageTest', '786r5mecv0')
fig = {
'data':[
{
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_core/test_stream/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import plotly.plotly as py
from plotly import exceptions

un = 'pythonapi'
un = 'PythonAPI'
ak = 'ubpiol2cve'
tk = 'vaia8trjjb'

Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_optional/test_ipython/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class TestPlotlyDisplay(unittest.TestCase):

def setUp(self):
plot_info = {"un": "plotlyimagetest", "fid": "2"}
plot_info = {"un": "PlotlyImageTest", "fid": "2"}
url = "https://plot.ly/~{un}/{fid}".format(**plot_info)
self.display_obj = tls.embed(url)
self.results = {}
Expand Down