From b287256ff8a08081b5e34b5e37ce7a20313f25d2 Mon Sep 17 00:00:00 2001 From: Tony Locke Date: Sun, 31 Mar 2024 13:22:03 +0100 Subject: [PATCH] i --- test/native/auth/test_scram-sha-256.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/native/auth/test_scram-sha-256.py b/test/native/auth/test_scram-sha-256.py index a60e486..aeb31e8 100644 --- a/test/native/auth/test_scram-sha-256.py +++ b/test/native/auth/test_scram-sha-256.py @@ -12,3 +12,21 @@ def test_scram_sha_256(db_kwargs): # Should only raise an exception saying db doesn't exist with pytest.raises(DatabaseError, match="3D000"): Connection(**db_kwargs) + + +def test_scram_sha_256_ssl_False(db_kwargs): + db_kwargs["database"] = "pg8000_scram_sha_256" + db_kwargs["ssl_context"] = False + + # Should only raise an exception saying db doesn't exist + with pytest.raises(DatabaseError, match="3D000"): + Connection(**db_kwargs) + + +def test_scram_sha_256_ssl_True(db_kwargs): + db_kwargs["database"] = "pg8000_scram_sha_256" + db_kwargs["ssl_context"] = True + + # Should only raise an exception saying db doesn't exist + with pytest.raises(DatabaseError, match="3D000"): + Connection(**db_kwargs)