def test_base_hook_notify(mocker): """ Test _Hook.notify """ stub = mocker.stub() hook = _Hook(callbacks={stub, }) hook.notify() stub.assert_called_once_with()
def test_base_hook_copy(mocker): callback0 = mocker.stub() h = _Hook(callbacks={callback0}) h_cpy = h.copy() assert h.callbacks == h_cpy.callbacks assert h.callbacks is not h_cpy.callbacks assert h.daemon == h_cpy.daemon
def test_base_hook_notify_without_callback(mocker): hook = _Hook() hook.notify()