def test_get_config(self): plotly_domain = 'test domain' plotly_streaming_domain = 'test streaming domain' config1 = py.get_config() py._config['plotly_domain'] = plotly_domain config2 = py.get_config() py._config['plotly_streaming_domain'] = plotly_streaming_domain config3 = py.get_config() self.assertEqual(config2['plotly_domain'], plotly_domain) self.assertNotEqual(config2['plotly_streaming_domain'], plotly_streaming_domain) self.assertEqual(config3['plotly_streaming_domain'], plotly_streaming_domain)
def test_get_config(self): plotly_domain = 'test domain' plotly_streaming_domain = 'test streaming domain' config1 = py.get_config() py._config['plotly_domain'] = plotly_domain config2 = py.get_config() py._config['plotly_streaming_domain'] = plotly_streaming_domain config3 = py.get_config() self.assertEqual(config2['plotly_domain'], plotly_domain) self.assertNotEqual( config2['plotly_streaming_domain'], plotly_streaming_domain ) self.assertEqual( config3['plotly_streaming_domain'], plotly_streaming_domain )
def test_sign_in_with_config(self): username = '******' api_key = 'place holder' plotly_domain = 'test domain' plotly_streaming_domain = 'test streaming domain' py.sign_in( username, api_key, plotly_domain=plotly_domain, plotly_streaming_domain=plotly_streaming_domain ) config = py.get_config() self.assertEqual(config['plotly_domain'], plotly_domain) self.assertEqual( config['plotly_streaming_domain'], plotly_streaming_domain )
def test_sign_in_with_config(self): username = '******' api_key = 'place holder' plotly_domain = 'test domain' plotly_streaming_domain = 'test streaming domain' plotly_ssl_verification = False py.sign_in(username, api_key, plotly_domain=plotly_domain, plotly_streaming_domain=plotly_streaming_domain, plotly_ssl_verification=plotly_ssl_verification) config = py.get_config() self.assertEqual(config['plotly_domain'], plotly_domain) self.assertEqual(config['plotly_streaming_domain'], plotly_streaming_domain) self.assertEqual(config['plotly_ssl_verification'], plotly_ssl_verification)