'L{ConnectedDatagramPort} calls L{ConnectedDatagramPort.stopListening}
instead of the deprecated C{loseConnection} in
L{ConnectedDatagramPort.connectionFailed}.'

def test_connectionFailedCallsStopListening(self):

    self.called = False
    def stopListening():
        '\n                                                Dummy    C{stopListening}    method.\n                                                '
        self.called = True
    port = unix.ConnectedDatagramPort(None, ClientProto())
    port.stopListening = stopListening
    port.connectionFailed('goodbye')
    self.assertTrue(self.called)
