Connection timeout must be tested somehow and the best way is to use some non-existent IP.
I ran into this problem myself and solved it like this:
https://github.com/pasha-r/urllib3/commit/4a3b45eb5f7fbfac41d43754e53b74862e79725d#L2R79
Which is essentially the same solution.