Node's timeouts trigger at the appropriate time
(self)
| 30 | self.failUnless(comp.join_called) |
| 31 | |
| 32 | def test_timeout(self): |
| 33 | """Node's timeouts trigger at the appropriate time""" |
| 34 | node = self.network.new_node('T') |
| 35 | |
| 36 | cb = mock.Mock(side_effect=lambda: self.kill(node)) |
| 37 | self.network.set_timer(node.address, 0.01, cb) |
| 38 | self.network.run() |
| 39 | self.failUnless(cb.called) |
| 40 | |
| 41 | def test_cancel_timeout(self): |
| 42 | """Node's timeouts do not occur if they are cancelled.""" |