def test_unhandle_resets_stop_variable(self): m = mock.Mock() h = handler.handler() h.chain(m) h.stop_propagation() h.unhandle() self.assertFalse(h.stop)
def test_unhandle_does_not_invoke_handlers_if_stop_is_set(self): m = mock.Mock() h = handler.handler() h.chain(m) h.stop_propagation() h.unhandle() self.assertEqual(0, m.cancel.call_count)
def test_unhandle_call_all_handlers(self): m = mock.Mock() h = handler.handler() h.chain(m) h.unhandle() m.unhandle.assert_called_with()