'C{daemonize} indeed calls L{IReactorDaemonize.beforeDaemonize} and
L{IReactorDaemonize.afterDaemonize} if the reactor implements
L{IReactorDaemonize}.'

def test_hooksCalled(self):

    reactor = FakeDaemonizingReactor()
    self.runner.daemonize(reactor)
    self.assertTrue(reactor._beforeDaemonizeCalled)
    self.assertTrue(reactor._afterDaemonizeCalled)
