Add a regression test for logging failed HTTP requests on Python 3.