def test_heartbeat(self):
        d = Deferred()
        def checkPulse(dummy):
            self.assertTrue(self.client.called_send_hb,
                        "A heartbeat frame was recently sent")
            self.assertTrue(self.client.called_reschedule_check,
                        "A heartbeat frame was recently received")
        d.addCallback(checkPulse)
        reactor.callLater(3, d.callback, None)
        return d
Test that heartbeat frames are sent and received
dataset/ETHPy150Open tweetdeck/txAMQP/src/txamqp/test/test_heartbeat.py/HeartbeatTests.test_heartbeat