Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Mar 31, 2024
1 parent 5130cb7 commit b287256
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/native/auth/test_scram-sha-256.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit b287256

Please sign in to comment.