Ejemplo n.º 1
0
 def test_register_timer(self):
     c = self.Consumer()
     g = Gossip(c)
     g.register_timer()
     c.timer.call_repeatedly.assert_called_with(g.interval, g.periodic)
     tref = g._tref
     g.register_timer()
     tref.cancel.assert_called_with()
Ejemplo n.º 2
0
 def test_register_timer(self):
     c = self.Consumer()
     g = Gossip(c)
     g.register_timer()
     c.timer.call_repeatedly.assert_called_with(g.interval, g.periodic)
     tref = g._tref
     g.register_timer()
     tref.cancel.assert_called_with()
Ejemplo n.º 3
0
 def test_register_timer(self):
     c = self.Consumer()
     g = Gossip(c)
     g.register_timer()
     c.timer.apply_interval.assert_called_with(g.interval * 1000.0, g.periodic)
     tref = g._tref
     g.register_timer()
     tref.cancel.assert_called_with()
Ejemplo n.º 4
0
 def test_register_timer(self):
     c = self.Consumer()
     g = Gossip(c)
     g.register_timer()
     c.timer.apply_interval.assert_called_with(
         g.interval * 1000.0,
         g.periodic,
     )
     tref = g._tref
     g.register_timer()
     tref.cancel.assert_called_with()