def test_maxReceiveLimit(self):
        """
        Netstrings with a length specification exceeding the specified
        C{MAX_LENGTH} are refused.
        """
        tooLong = self.netstringReceiver.MAX_LENGTH + 1
        self.netstringReceiver.dataReceived(b"".join(
            (bytes(tooLong), b":", b"a" * tooLong)))
        self.assertTrue(self.transport.disconnecting)

        Netstrings with a length specification exceeding the specified
        C{MAX_LENGTH} are refused.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/test/test_basic.py