'Only L{RequestNotSent}, L{RequestTransmissionFailed} and
L{ResponseNeverReceived} exceptions cause a retry.'

def test_onlyRetryIfNoResponseReceived(self):

    pool = client.HTTPConnectionPool(None)
    connection = client._RetryingHTTP11ClientProtocol(None, pool)
    self.assertTrue(connection._shouldRetry('GET', RequestNotSent(), None))
    self.assertTrue(connection._shouldRetry('GET', RequestTransmissionFailed([]), None))
    self.assertTrue(connection._shouldRetry('GET', ResponseNeverReceived([]), None))
    self.assertFalse(connection._shouldRetry('GET', ResponseFailed([]), None))
    self.assertFalse(connection._shouldRetry('GET', ConnectionRefusedError(), None))
