File tree Expand file tree Collapse file tree 2 files changed +35
-7
lines changed Expand file tree Collapse file tree 2 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
3
- from psqlpy import ConnectionPool
3
+ from psqlpy import ConnectionPool , SslMode
4
4
5
5
pytestmark = pytest .mark .anyio
6
6
7
7
8
- async def test_ssl_mode_require (psql_pool_with_cert_file : ConnectionPool ) -> None :
9
- await psql_pool_with_cert_file .execute ("SELECT 1" )
8
+ @pytest .mark .parametrize (
9
+ "ssl_mode" ,
10
+ (
11
+ SslMode .Allow ,
12
+ SslMode .Prefer ,
13
+ SslMode .Require ,
14
+ SslMode .VerifyCa ,
15
+ SslMode .VerifyFull ,
16
+ ),
17
+ )
18
+ async def test_ssl_mode_require (
19
+ ssl_mode : SslMode ,
20
+ postgres_host : str ,
21
+ postgres_user : str ,
22
+ postgres_password : str ,
23
+ postgres_port : int ,
24
+ postgres_dbname : str ,
25
+ ssl_cert_file : str ,
26
+ ) -> None :
27
+ pg_pool = ConnectionPool (
28
+ username = postgres_user ,
29
+ password = postgres_password ,
30
+ host = postgres_host ,
31
+ port = postgres_port ,
32
+ db_name = postgres_dbname ,
33
+ ssl_mode = ssl_mode ,
34
+ ca_file = ssl_cert_file ,
35
+ )
36
+
37
+ await pg_pool .execute (&quo
9F98
t;SELECT 1" )
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ env_list =
10
10
[gh]
11
11
python =
12
12
3.12 = py312
13
- ; 3.11 = py311
14
- ; 3.10 = py310
15
- ; 3.9 = py39
16
- ; 3.8 = py38
13
+ 3.11 = py311
14
+ 3.10 = py310
15
+ 3.9 = py39
16
+ 3.8 = py38
17
17
18
18
[testenv]
19
19
skip_install = true
You can’t perform that action at this time.
0 commit comments