def test_decodeRdlengthTooLong(self):
        """
        L{dns._OPTHeader.decode} raises an exception if the supplied
        RDLEN is too long.
        """
        b = BytesIO(
            OPTNonStandardAttributes.bytes(excludeOptions=True) + (

                b'\x00\x07' # RDLEN 7 Too long - should be 6

                b'\x00\x01' # OPTION-CODE
                b'\x00\x02' # OPTION-LENGTH
                b'\x00\x00' # OPTION-DATA
                ))
        h = dns._OPTHeader()
        self.assertRaises(EOFError, h.decode, b)

        L{dns._OPTHeader.decode} raises an exception if the supplied
        RDLEN is too long.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py