def test_authenticDataEncode(self):
        """
        L{dns.Message.toStr} encodes L{dns.Message.authenticData} into
        byte4 of the byte string.
        """
        self.assertEqual(
            dns.Message(authenticData=1).toStr(),
            MESSAGE_AUTHENTIC_DATA_BYTES
        )

        L{dns.Message.toStr} encodes L{dns.Message.authenticData} into
        byte4 of the byte string.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py