@@ -6,50 +6,13 @@ using Base.Test
66
77Plotly. signin (" unittest" ," tfzz811f5n" , Dict (" plotly_domain" => " https://plot.ly" ," plotly_api_domain" => " https://api.plot.ly" ))
88
9- (x0,y0) = [1 ,2 ,3 ], [4 ,5 ,6 ]
10- (x1,y1) = [1 ,2 ,3 ], [2 ,10 ,12 ]
11-
12- response = Plotly. plot ([[x0 y0] [x1 y1]], Dict (" filename" => " basic_test_plot" ))
13- @test response[" error" ] == " "
14-
15- datastyle = Dict (" line" => Dict (" color" => " rgb(84, 39, 143)" , " width" => 4 ))
16- style_res = Plotly. style (datastyle, Dict (" filename" => " basic_test_plot" ))
17- @test style_res[" error" ] == " "
18-
19- layout_res = Plotly. layout (Dict (" title" => " Hello World" ), Dict (" filename" => " basic_test_plot" ))
20- @test layout_res[" error" ] == " "
21-
22- # just check that these won't raise an error
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" ))
28- @test response[" error" ] == " "
29-
30- # and one last check
31- response = Plotly. plot ([sin, cos, abs, log], Dict (" left" => eps (), " right" => 10 , " step" => 1 , " filename" => " test_plot" ))
32- @test response[" error" ] == " "
33-
34- #= getFile is broken because the /content endpoint isn't supported anymore?
35- figure = Plotly.getFile("5", "chris")
36- @test length(figure["data"][1]["x"]) == 501
37- @test haskey(figure["layout"], "xaxis")
38-
39- response = Plotly.plot(figure["data"], Dict("layout"=> figure["layout"], "filename" => "test_get_figure_plot"))
40- @test response["error"] == ""
41- =#
9+ # Check for no error
10+ original_plot = Plotly. plot ([scatter (x= [1 ,2 ],y= [3 ,4 ])])
11+ remote_plot = post (original_plot)
12+ downloaded_plot = download (remote_plot)
4213
4314# test get_plot_endpoint
4415endpoints = Dict (" plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" )
4516Plotly. signin (" test_username" , " test_api_key" , endpoints)
4617plot_endpoint = Plotly. get_plot_endpoint ()
4718@test plot_endpoint == " my_plotly_domain/clientresp"
48-
49- # test get_content_endpoint
50- endpoints = Dict (" plotly_domain" => " my_plotly_domain" , " plotly_api_domain" => " my_plotly_api_domain" )
51- Plotly. signin (" test_username" , " test_api_key" , endpoints)
52- fid = " 123_fake"
53- owner = " test_owner"
54- content_endpoint = Plotly. get_content_endpoint (fid, owner)
55- @test content_endpoint == " my_plotly_api_domain/v2/files/test_owner:123_fake/content"
0 commit comments