File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
tests/test_core/test_tools Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def test_set_config_file_world_readable(self):
52
52
kwargs = {'world_readable' : 'True' }
53
53
self .assertRaises (TypeError , tools .set_config_file , ** kwargs )
54
54
55
- def test_set_config_expected_error_msg (self ):
55
+ def test_set_config_expected_warning_msg (self ):
56
56
57
57
# Check that UserWarning is being called with http plotly_domain
58
58
@@ -64,6 +64,18 @@ def test_set_config_expected_error_msg(self):
64
64
assert issubclass (w [- 1 ].category , UserWarning )
65
65
assert "plotly_domain" in str (w [- 1 ].message )
66
66
67
+
68
+ def test_set_config_no_warning_msg_if_plotly_domain_is_https (self ):
69
+
70
+ # Check that no UserWarning is being called with https plotly_domain
71
+
72
+ with warnings .catch_warnings (record = True ) as w :
73
+ warnings .simplefilter ("always" )
74
+ kwargs = {'plotly_domain' : 'https://www.foo-bar.com' }
75
+ tools .set_config_file (** kwargs )
76
+ assert len (w ) == 0
77
+
78
+
67
79
def test_reset_config_file (self ):
68
80
69
81
# Check reset_config and get_config return the same values
Original file line number Diff line number Diff line change 35
35
36
36
http_msg = (
37
37
"The plotly_domain and plotly_api_domain of your config file must start "
38
- "with 'https', 'http'.\n If you are not using On-Prem then run the "
38
+ "with 'https', not 'http'.\n If you are not using On-Premise then run the "
39
39
"following code to ensure your plotly_domain and plotly_api_domain start "
40
40
"with 'https':\n \n \n "
41
41
"import plotly\n "
42
42
"plotly.tools.set_config_file(\n "
43
43
" plotly_domain='https://plot.ly',\n "
44
44
" plotly_api_domain='https://api.plot.ly'\n "
45
45
")\n \n \n "
46
- "If you are using On-Prem then you will need to use your company's "
46
+ "If you are using On-Premise then you will need to use your company's "
47
47
"domain and api_domain urls:\n \n \n "
48
48
"import plotly\n "
49
49
"plotly.tools.set_config_file(\n "
53
53
"Make sure to replace `your-company.com` with the URL of your Plotly "
54
54
"On-Premise server.\n See "
55
55
"https://plot.ly/python/getting-started/#special-instructions-for-plotly-onpremise-users "
56
- "for more help with getting started with On-Prem ."
56
+ "for more help with getting started with On-Premise ."
57
57
)
58
58
59
59
You can’t perform that action at this time.
0 commit comments