'Verify that the C{stopListening} method of an L{IListeningPort} removes
that port from the reactor\'s "readers" set and also that the
L{Deferred} returned by that method fires with L{None}.
@param port: The port object to stop.
@type port: L{IListeningPort} provider'

def _stopPort(self, port):

    stopped = port.stopListening()
    self.assertNotIn(port, self.reactor.getReaders())
    self.reactor.advance(0)
    self.assertIsNone(self.successResultOf(stopped))
