Skip to content

Commit 46d3cc9

Browse files
committed
chuck's requestsed changes from review
1 parent efc36a2 commit 46d3cc9

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

plotly/tests/test_core/test_tools/test_file_tools.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_set_config_file_world_readable(self):
5252
kwargs = {'world_readable': 'True'}
5353
self.assertRaises(TypeError, tools.set_config_file, **kwargs)
5454

55-
def test_set_config_expected_error_msg(self):
55+
def test_set_config_expected_warning_msg(self):
5656

5757
# Check that UserWarning is being called with http plotly_domain
5858

@@ -64,6 +64,18 @@ def test_set_config_expected_error_msg(self):
6464
assert issubclass(w[-1].category, UserWarning)
6565
assert "plotly_domain" in str(w[-1].message)
6666

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+
6779
def test_reset_config_file(self):
6880

6981
# Check reset_config and get_config return the same values

plotly/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535

3636
http_msg = (
3737
"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 "
3939
"following code to ensure your plotly_domain and plotly_api_domain start "
4040
"with 'https':\n\n\n"
4141
"import plotly\n"
4242
"plotly.tools.set_config_file(\n"
4343
" plotly_domain='https://plot.ly',\n"
4444
" plotly_api_domain='https://api.plot.ly'\n"
4545
")\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 "
4747
"domain and api_domain urls:\n\n\n"
4848
"import plotly\n"
4949
"plotly.tools.set_config_file(\n"
@@ -53,7 +53,7 @@
5353
"Make sure to replace `your-company.com` with the URL of your Plotly "
5454
"On-Premise server.\nSee "
5555
"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."
5757
)
5858

5959

0 commit comments

Comments
 (0)