@@ -1391,6 +1391,12 @@ def test_ocsp_mode_disable_ocsp_checks(conn_cnx, caplog):
1391
1391
with conn_cnx (disable_ocsp_checks = True ) as conn , conn .cursor () as cur :
1392
1392
assert cur .execute ("select 1" ).fetchall () == [(1 ,)]
1393
1393
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
1394
1400
1395
1401
1396
1402
@pytest .mark .skipolddriver
@@ -1433,6 +1439,7 @@ def test_ocsp_mode_insecure_mode_and_disable_ocsp_checks_mismatch_ocsp_disabled(
1433
1439
"The values for 'disable_ocsp_checks' and 'insecure_mode' differ. "
1434
1440
"Using the value of 'disable_ocsp_checks."
1435
1441
) in caplog .text
1442
+ assert "This connection does not perform OCSP checks." in caplog .text
1436
1443
1437
1444
1438
1445
@pytest .mark .skipolddriver
@@ -1449,13 +1456,8 @@ def test_ocsp_mode_insecure_mode_and_disable_ocsp_checks_mismatch_ocsp_enabled(
1449
1456
"The values for 'disable_ocsp_checks' and 'insecure_mode' differ. "
1450
1457
"Using the value of 'disable_ocsp_checks."
1451
1458
) 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
1459
1461
1460
1462
1461
1463
@pytest .mark .skipolddriver
0 commit comments