def test_invalidPortError(self):
        """
        'INVALID-PORT' error should map to the L{ident.InvalidPort} exception.
        """
        d = defer.Deferred()
        self.client.queries.append((d, 345, 567))
        self.client.lineReceived('345, 567 :  ERROR : INVALID-PORT')
        return self.assertFailure(d, ident.InvalidPort)

        'INVALID-PORT' error should map to the L{ident.InvalidPort} exception.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ident.py