class documentation

Tests for the encoding and decoding of various standard (not EDNS) messages.

These tests should work with both dns._EDNSMessage and dns.Message.

TestCase classes that use this mixin must provide a messageFactory method which accepts any argment supported by dns._EDNSMessage.__init__.

EDNS specific arguments may be discarded if not supported by the message class under construction.

Method test_authoritativeMessageDecode The message and its dns.RRHeader instances created by decode from an authoritative message byte string, are marked as authoritative.
Method test_authoritativeMessageEncode If the message authoritative attribute is set to 1, the encoded bytes will have AA bit 1.
Method test_completeQueryDecode A fully populated message byte string can be decoded.
Method test_completeQueryEncode A fully populated query message can be encoded.
Method test_emptyMessageDecode An empty message byte sequence can be decoded.
Method test_emptyMessageEncode An empty message can be encoded.
Method test_nonAuthoritativeMessageDecode The dns.RRHeader instances created by a message from a non-authoritative message byte string are marked as not authoritative.
Method test_nonAuthoritativeMessageEncode If the message authoritative attribute is set to 0, the encoded bytes will have AA bit 0.
Method test_NULL A NULL record with an arbitrary payload can be encoded and decoded as part of a message.
Method test_truncatedMessageDecode The message instance created by decoding a truncated message is marked as truncated.
Method test_truncatedMessageEncode If the message trunc attribute is set to 1 the encoded bytes will have TR bit 1.
def test_authoritativeMessageDecode(self): (source)

The message and its dns.RRHeader instances created by decode from an authoritative message byte string, are marked as authoritative.

def test_authoritativeMessageEncode(self): (source)

If the message authoritative attribute is set to 1, the encoded bytes will have AA bit 1.

def test_completeQueryDecode(self): (source)

A fully populated message byte string can be decoded.

def test_completeQueryEncode(self): (source)

A fully populated query message can be encoded.

def test_emptyMessageDecode(self): (source)

An empty message byte sequence can be decoded.

def test_emptyMessageEncode(self): (source)

An empty message can be encoded.

def test_nonAuthoritativeMessageDecode(self): (source)

The dns.RRHeader instances created by a message from a non-authoritative message byte string are marked as not authoritative.

def test_nonAuthoritativeMessageEncode(self): (source)

If the message authoritative attribute is set to 0, the encoded bytes will have AA bit 0.

def test_NULL(self): (source)

A NULL record with an arbitrary payload can be encoded and decoded as part of a message.

def test_truncatedMessageDecode(self): (source)

The message instance created by decoding a truncated message is marked as truncated.

def test_truncatedMessageEncode(self): (source)

If the message trunc attribute is set to 1 the encoded bytes will have TR bit 1.