added test_connection_error and test_too_many_redirects