@@ -35,14 +35,21 @@ def test_default_connection(self):
3535 self .assertEqual ("<Connection <Client ['http://127.0.0.1:4200']>>" ,
3636 repr (conn .connection ))
3737
38- def test_connection_server (self ):
38+ def test_connection_server_uri_http (self ):
3939 engine = sa .create_engine (
4040 "crate://otherhost:19201" )
4141 conn = engine .raw_connection ()
4242 self .assertEqual ("<Connection <Client ['http://otherhost:19201']>>" ,
4343 repr (conn .connection ))
4444
45- def test_connection_multiple_server (self ):
45+ def test_connection_server_uri_https (self ):
46+ engine = sa .create_engine (
47+ "crate://otherhost:19201/?ssl=true" )
48+ conn = engine .raw_connection ()
49+ self .assertEqual ("<Connection <Client ['https://otherhost:19201']>>" ,
50+ repr (conn .connection ))
51+
52+ def test_connection_multiple_server_http (self ):
4653 engine = sa .create_engine (
4754 "crate://" , connect_args = {
4855 'servers' : ['localhost:4201' , 'localhost:4202' ]
@@ -53,3 +60,16 @@ def test_connection_multiple_server(self):
5360 "<Connection <Client ['http://localhost:4201', " +
5461 "'http://localhost:4202']>>" ,
5562 repr (conn .connection ))
63+
64+ def test_connection_multiple_server_https (self ):
65+ engine = sa .create_engine (
66+ "crate://" , connect_args = {
67+ 'servers' : ['https://localhost:4201' , 'https://localhost:4202' ],
68+ 'ssl' : True ,
69+ }
70+ )
71+ conn = engine .raw_connection ()
72+ self .assertEqual (
73+ "<Connection <Client ['https://localhost:4201', " +
74+ "'https://localhost:4202']>>" ,
75+ repr (conn .connection ))
0 commit comments