@@ -4,48 +4,50 @@ using Base.Test
44
55# just check that http://plot.ly/clientresp behaves as expected -- nothing to see here
66
7- Plotly. signin (" unittest" ," tfzz811f5n" , { " plotly_domain" => " https://plot.ly" ," plotly_api_domain" => " https://api.plot.ly" } )
7+ Plotly. signin (" unittest" ," tfzz811f5n" , Dict ( " plotly_domain" => " https://plot.ly" ," plotly_api_domain" => " https://api.plot.ly" ) )
88
99(x0,y0) = [1 ,2 ,3 ], [4 ,5 ,6 ]
1010(x1,y1) = [1 ,2 ,3 ], [2 ,10 ,12 ]
1111
12- response = Plotly. plot ([[x0 y0] [x1 y1]], [ " filename" => " basic_test_plot" ] )
12+ response = Plotly. plot ([[x0 y0] [x1 y1]], Dict ( " filename" => " basic_test_plot" ) )
1313@test response[" error" ] == " "
1414
15- datastyle = [ " line" => [ " color" => " rgb(84, 39, 143)" , " width" => 4 ]]
16- style_res = Plotly. style (datastyle, [ " filename" => " basic_test_plot" ] )
15+ datastyle = Dict ( " line" => Dict ( " color" => " rgb(84, 39, 143)" , " width" => 4 ))
16+ style_res = Plotly. style (datastyle, Dict ( " filename" => " basic_test_plot" ) )
1717@test style_res[" error" ] == " "
1818
19- layout_res = Plotly. layout ([ " title" => " Hello World" ], [ " filename" => " basic_test_plot" ] )
19+ layout_res = Plotly. layout (Dict ( " title" => " Hello World" ), Dict ( " filename" => " basic_test_plot" ) )
2020@test layout_res[" error" ] == " "
2121
2222# just check that these won't raise an error
23- trace1 = Plotly. line (sin, [ " left" => 0 , " right" => 10 , " step" => 1 ] )
24- trace2 = Plotly. histogram (cos, [ " left" => 0 , " right" => 10 , " step" => 1 ] )
25- trace3 = Plotly. box (abs, [ " left" => 0 , " right" => 10 , " step" => 1 ] )
26- trace4 = Plotly. scatter (log, [ " left" => 0 , " right" => 10 , " step" => 1 ] )
27- response = Plotly. plot ([trace1, trace2, trace3, trace4], [ " filename" => " test_plot" ] )
23+ trace1 = Plotly. line (sin, Dict ( " left" => 0 , " right" => 10 , " step" => 1 ) )
24+ trace2 = Plotly. histogram (cos, Dict ( " left" => 0 , " right" => 10 , " step" => 1 ) )
25+ trace3 = Plotly. box (abs, Dict ( " left" => 0 , " right" => 10 , " step" => 1 ) )
26+ trace4 = Plotly. scatter (log, Dict ( " left" => 0 , " right" => 10 , " step" => 1 ) )
27+ response = Plotly. plot ([trace1, trace2, trace3, trace4], Dict ( " filename" => " test_plot" ) )
2828@test response[" error" ] == " "
2929
3030# and one last check
31- response = Plotly. plot ([sin, cos, abs, log], [ " left" => eps (), " right" => 10 , " step" => 1 , " filename" => " test_plot" ] )
31+ response = Plotly. plot ([sin, cos, abs, log], Dict ( " left" => eps (), " right" => 10 , " step" => 1 , " filename" => " test_plot" ) )
3232@test response[" error" ] == " "
3333
34+ #= getFile is broken because the /content endpoint isn't supported anymore?
3435figure = Plotly.getFile("5", "chris")
3536@test length(figure["data"][1]["x"]) == 501
3637@test haskey(figure["layout"], "xaxis")
3738
38- response = Plotly. plot (figure[" data" ], [ " layout" => figure[" layout" ], " filename" => " test_get_figure_plot" ] )
39+ response = Plotly.plot(figure["data"], Dict( "layout"=> figure["layout"], "filename" => "test_get_figure_plot") )
3940@test response["error"] == ""
41+ =#
4042
4143# test get_plot_endpoint
42- endpoints = { " plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" }
44+ endpoints = Dict ( " plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" )
4345Plotly. signin (" test_username" , " test_api_key" , endpoints)
4446plot_endpoint = Plotly. get_plot_endpoint ()
4547@test plot_endpoint == " my_plotly_domain/clientresp"
4648
4749# test get_content_endpoint
48- endpoints = { " plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" }
50+ endpoints = Dict ( " plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" )
4951Plotly. signin (" test_username" , " test_api_key" , endpoints)
5052fid = " 123_fake"
5153owner = " test_owner"
0 commit comments