'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.'

def test_fromMessageCopiesSections(self):

    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,)))
