

def test_queueSendIntentIsSentOnFailureCallbackOfPending(self):
    self.resetCounters()
    self.test_sendIntentToTransportUpToLimitAndThenQueueInternally()
    self.testTrans.forTestingCompleteAPendingIntent(SendStatus.Failed)
    self.assertEqual(self.successCBcalls, 0)
    self.assertEqual(self.failureCBcalls, 1)
    self.assertEqual((MAX_PENDING_TRANSMITS + 1), len(self.testTrans.intents))
    self.assertEqual(1, len([I for I in self.testTrans.intents if (I.message in self.extraTransmitIds)]))

dataset/ETHPy150Open godaddy/Thespian/thespian/system/transport/test/test_asyncBase.py TestAsyncTransportBase.test_queueSendIntentIsSentOnFailureCallbackOfPending/original