b42c5bf652
The previous test patched ssl.create_default_context globally with a bare SSLContext that has zero CA certs. Both verify_ca_bundle() and the macOS fallback got the same mocked context, so the test verified nothing useful: both paths produced empty get_ca_certs() and the assertion that no exception escaped was vacuously satisfied. Only mock the fallback call (no cafile) — let the certifi call hit the real SSL stack and fail with SSLError on the broken PEM. The mock fallback returns a context with load_default_certs() so the test now verifies the real scenario: broken certifi → SSLConfigurationError, macOS system trust store → success. Also pads the broken PEM past the 1 KB size guard so the size check doesn't short-circuit before ssl.create_default_context(cafile=...) runs. Reported by @liuhao1024 in PR review.