18
18
tk = 'vaia8trjjb'
19
19
config = {'plotly_domain' : 'https://plot.ly' ,
20
20
'plotly_streaming_domain' : 'stream.plot.ly' ,
21
- 'plotly_api_domain' : 'https://api.plot.ly' }
21
+ 'plotly_api_domain' : 'https://api.plot.ly' ,
22
+ 'plotly_ssl_verification' : False }
22
23
23
24
24
25
class TestStreaming (TestCase ):
@@ -147,6 +148,7 @@ def test_stream_http(self):
147
148
'server' : 'stream.plot.ly' ,
148
149
'port' : 80 ,
149
150
'ssl_enabled' : False ,
151
+ 'ssl_verification_enabled' : False ,
150
152
'headers' : {
151
153
'Host' : 'stream.plot.ly' ,
152
154
'plotly-streamtoken' : tk
@@ -158,15 +160,20 @@ def test_stream_http(self):
158
160
def test_stream_https (self ):
159
161
160
162
# If the https scheme is used in the plotly_streaming_domain, port 443
161
- # should be used for streaming and ssl_enabled should be True
163
+ # should be used for streaming, ssl_enabled should be True,
164
+ # and ssl_verification_enabled should equal plotly_ssl_verification
162
165
163
- py .sign_in (un , ak ,
164
- ** {'plotly_streaming_domain' : 'https://stream.plot.ly' })
166
+ ssl_stream_config = {
167
+ 'plotly_streaming_domain' : 'https://stream.plot.ly' ,
168
+ 'plotly_ssl_verification' : True
169
+ }
170
+ py .sign_in (un , ak , ** ssl_stream_config )
165
171
my_stream = py .Stream (tk )
166
172
expected_streaming_specs = {
167
173
'server' : 'stream.plot.ly' ,
168
174
'port' : 443 ,
169
175
'ssl_enabled' : True ,
176
+ 'ssl_verification_enabled' : True ,
170
177
'headers' : {
171
178
'Host' : 'stream.plot.ly' ,
172
179
'plotly-streamtoken' : tk
0 commit comments