shazow/urllib3 — pull request #265 by Lukasa (2013-10-19 11:17:49+00:00)
Title: Abuse SSL to fix test coverage.

We have a branch of the code that catches SSL errors thrown by `getresponse()`. This currently doesn't happen during any of our tests. It can only really happen if we're sent non-SSL (or bad SSL) data when receiving a response to an SSL request. This is _totally crazy_, but it's better to be safe than sorry.

This test replicates that level of craziness, involving no fewer than three sockets and a lot of sadness, but it successfully tests that path and confirms that we do roughly the right thing. It also returns test coverage to 100%.