'C{reactor.addWriter()} accepts an L{IWriteDescriptor} provider and
calls its C{doWrite} method when it may be possible to write to its
C{fileno}.'

def test_addWriter(self):

    (reactor, fd, server) = self._simpleSetup()
    def removeAndStop():
        reactor.removeWriter(fd)
        reactor.stop()
    fd.doWrite = removeAndStop
    reactor.addWriter(fd)
    self.runReactor(reactor)
