@@ -12,19 +12,43 @@ def test_postgres_pool_size():
1212 assert kwargs == {"min_size" : 1 , "max_size" : 20 }
1313
1414
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+
1521def test_postgres_ssl ():
1622 backend = PostgresBackend ("postgres://localhost/database?ssl=true" )
1723 kwargs = backend ._get_connection_kwargs ()
1824 assert kwargs == {"ssl" : True }
1925
2026
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+
2133def test_mysql_pool_size ():
2234 backend = MySQLBackend ("mysql://localhost/database?min_size=1&max_size=20" )
2335 kwargs = backend ._get_connection_kwargs ()
2436 assert kwargs == {"minsize" : 1 , "maxsize" : 20 }
2537
2638
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+
2745def test_mysql_ssl ():
2846 backend = MySQLBackend ("postgres://localhost/database?ssl=true" )
2947 kwargs = backend ._get_connection_kwargs ()
3048 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