

def test_sendIntentToTransportUpToLimitAndThenQueueInternally(self):
    for count in range(MAX_PENDING_TRANSMITS):
        self.testTrans.scheduleTransmit(None, TransmitIntent(ActorAddress('me'), ('message%d' % count), self.successCB, self.failureCB))
    self.assertEqual(MAX_PENDING_TRANSMITS, len(self.testTrans.intents))
    for count in self.extraTransmitIds:
        self.testTrans.scheduleTransmit(None, TransmitIntent(ActorAddress(9), count, self.successCB, self.failureCB))
    self.assertEqual(MAX_PENDING_TRANSMITS, len(self.testTrans.intents))
    self.assertFalse([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_sendIntentToTransportUpToLimitAndThenQueueInternally/original