

def test_sendIntentToTransportSuccessCallback(self):
    self.resetCounters()
    testIntent = TransmitIntent(ActorAddress(0), 'message', self.successCB, self.failureCB)
    self.testTrans.scheduleTransmit(None, testIntent)
    self.assertEqual(1, len(self.testTrans.intents))
    self.testTrans.forTestingCompleteAPendingIntent(SendStatus.Sent)
    self.assertEqual(self.successCBcalls, 1)
    self.assertEqual(self.failureCBcalls, 0)

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