'Only GET, HEAD, OPTIONS, TRACE, DELETE methods cause a retry.'

def test_onlyRetryIdempotentMethods(self):

    pool = client.HTTPConnectionPool(None)
    connection = client._RetryingHTTP11ClientProtocol(None, pool)
    self.assertTrue(connection._shouldRetry('GET', RequestNotSent(), None))
    self.assertTrue(connection._shouldRetry('HEAD', RequestNotSent(), None))
    self.assertTrue(connection._shouldRetry('OPTIONS', RequestNotSent(), None))
    self.assertTrue(connection._shouldRetry('TRACE', RequestNotSent(), None))
    self.assertTrue(connection._shouldRetry('DELETE', RequestNotSent(), None))
    self.assertFalse(connection._shouldRetry('POST', RequestNotSent(), None))
    self.assertFalse(connection._shouldRetry('MYMETHOD', RequestNotSent(), None))
