Skip to content

Commit f125de3

Browse files
review fixes
1 parent 6693834 commit f125de3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/integ/test_connection.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,12 @@ def test_ocsp_mode_disable_ocsp_checks(conn_cnx, caplog):
13911391
with conn_cnx(disable_ocsp_checks=True) as conn, conn.cursor() as cur:
13921392
assert cur.execute("select 1").fetchall() == [(1,)]
13931393
assert "snowflake.connector.ocsp_snowflake:" not in caplog.text
1394+
assert "This connection does not perform OCSP checks." in caplog.text
1395+
caplog.clear()
1396+
with conn_cnx() as conn, conn.cursor() as cur:
1397+
assert cur.execute("select 1").fetchall() == [(1,)]
1398+
assert "snowflake.connector.ocsp_snowflake" in caplog.text
1399+
assert "This connection does not perform OCSP checks." not in caplog.text
13941400

13951401

13961402
@pytest.mark.skipolddriver
@@ -1433,6 +1439,7 @@ def test_ocsp_mode_insecure_mode_and_disable_ocsp_checks_mismatch_ocsp_disabled(
14331439
"The values for 'disable_ocsp_checks' and 'insecure_mode' differ. "
14341440
"Using the value of 'disable_ocsp_checks."
14351441
) in caplog.text
1442+
assert "This connection does not perform OCSP checks." in caplog.text
14361443

14371444

14381445
@pytest.mark.skipolddriver
@@ -1449,13 +1456,8 @@ def test_ocsp_mode_insecure_mode_and_disable_ocsp_checks_mismatch_ocsp_enabled(
14491456
"The values for 'disable_ocsp_checks' and 'insecure_mode' differ. "
14501457
"Using the value of 'disable_ocsp_checks."
14511458
) in caplog.text
1452-
if "This connection is in OCSP Fail Open Mode" in caplog.text:
1453-
# OCSP is enabled, should see OCSP activity
1454-
assert "snowflake.connector.ocsp_snowflake:" in caplog.text
1455-
assert "This connection does not perform OCSP checks." not in caplog.text
1456-
else:
1457-
# OCSP is disabled, should not see OCSP activity
1458-
assert "snowflake.connector.ocsp_snowflake:" not in caplog.text
1459+
assert "snowflake.connector.ocsp_snowflake:" in caplog.text
1460+
assert "This connection does not perform OCSP checks." not in caplog.text
14591461

14601462

14611463
@pytest.mark.skipolddriver

0 commit comments

Comments
 (0)