@@ -12,19 +12,43 @@ def test_postgres_pool_size():
12
12
assert kwargs == {"min_size" : 1 , "max_size" : 20 }
13
13
14
14
15
+ def test_postgres_explicit_pool_size ():
16
+ backend = PostgresBackend ("postgres://localhost/database" , min_size = 1 , max_size = 20 )
17
+ kwargs = backend ._get_connection_kwargs ()
18
+ assert kwargs == {"min_size" : 1 , "max_size" : 20 }
19
+
20
+
15
21
def test_postgres_ssl ():
16
22
backend = PostgresBackend ("postgres://localhost/database?ssl=true" )
17
23
kwargs = backend ._get_connection_kwargs ()
18
24
assert kwargs == {"ssl" : True }
19
25
20
26
27
+ def test_postgres_explicit_ssl ():
28
+ backend = PostgresBackend ("postgres://localhost/database" , ssl = True )
29
+ kwargs = backend ._get_connection_kwargs ()
30
+ assert kwargs == {"ssl" : True }
31
+
32
+
21
33
def test_mysql_pool_size ():
22
34
backend = MySQLBackend ("mysql://localhost/database?min_size=1&max_size=20" )
23
35
kwargs = backend ._get_connection_kwargs ()
24
36
assert kwargs == {"minsize" : 1 , "maxsize" : 20 }
25
37
26
38
39
+ def test_mysql_explicit_pool_size ():
40
+ backend = MySQLBackend ("mysql://localhost/database" , min_size = 1 , max_size = 20 )
41
+ kwargs = backend ._get_connection_kwargs ()
42
+ assert kwargs == {"minsize" : 1 , "maxsize" : 20 }
43
+
44
+
27
45
def test_mysql_ssl ():
28
46
backend = MySQLBackend ("postgres://localhost/database?ssl=true" )
29
47
kwargs = backend ._get_connection_kwargs ()
30
48
assert kwargs == {"ssl" : True }
49
+
50
+
51
+ def test_mysql_explicit_ssl ():
52
+ backend = MySQLBackend ("postgres://localhost/database" , ssl = True )
53
+ kwargs = backend ._get_connection_kwargs ()
54
+ assert kwargs == {"ssl" : True }
0 commit comments