def testLateRequester(self):

        medium = self.get_local('medium')
        agent = self.get_local('agent')
        recip = IRecipient(agent)

        requester = agent.initiate_protocol(LateRequester, recip)

        d = requester.notify_finish()
        self.assertFailure(d, protocols.ProtocolExpired)
        yield d

        yield agent.callback_event("late event", None)

        self.assertCalled(agent, 'called', times=0)
예제 #2
0
파일: host_agent.py 프로젝트: f3at/feat
 def on_restarted(self, agent):
     agent.callback_event('shard_agent_restarted', self.recipient)