

def test_allQueueSendIntentsAreSentOnEnoughPendingCallbackCompletions(self):
    numExtras = len(self.extraTransmitIds)
    self.resetCounters()
    self.test_sendIntentToTransportUpToLimitAndThenQueueInternally()
    self.assertTrue((MAX_PENDING_TRANSMITS > numExtras))
    for _extras in range(numExtras):
        self.testTrans.forTestingCompleteAPendingIntent(SendStatus.Sent)
    self.assertEqual(self.successCBcalls, numExtras)
    self.assertEqual((MAX_PENDING_TRANSMITS + numExtras), len(self.testTrans.intents))
    self.assertEqual(numExtras, 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_allQueueSendIntentsAreSentOnEnoughPendingCallbackCompletions/original