def test_fromMessageCopiesSections(self):
        """
        L{dns._EDNSMessage._fromMessage} returns an L{_EDNSMessage} instance
        whose queries, answers, authority and additional lists are copies (not
        references to) the original message lists.
        """
        standardMessage = dns.Message()
        standardMessage.fromStr(MessageEDNSQuery.bytes())

        ednsMessage = dns._EDNSMessage._fromMessage(standardMessage)

        duplicates = []
        for attrName in ('queries', 'answers', 'authority', 'additional'):
            if (getattr(standardMessage, attrName)
                is getattr(ednsMessage, attrName)):
                duplicates.append(attrName)

        if duplicates:
            self.fail(
                'Message and _EDNSMessage shared references to the following '
                'section lists after decoding: %s' % (duplicates,))

        L{dns._EDNSMessage._fromMessage} returns an L{_EDNSMessage} instance
        whose queries, answers, authority and additional lists are copies (not
        references to) the original message lists.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py