twisted.names.test.test_dns.StandardEncodingTestsMixin(object) class documentationtwisted.names.test.test_dns
(View In Hierarchy)
Known subclasses: twisted.names.test.test_dns.EDNSMessageStandardEncodingTests, twisted.names.test.test_dns.MessageStandardEncodingTests
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_emptyMessageEncode | An empty message can be encoded. | 
| Method | test_emptyMessageDecode | An empty message byte sequence can be decoded. | 
| Method | test_completeQueryEncode | A fully populated query message can be encoded. | 
| Method | test_completeQueryDecode | A fully populated message byte string can be decoded. | 
| Method | test_NULL | A NULL record with an arbitrary payload can be encoded and decoded as part of a message. | 
| Method | test_nonAuthoritativeMessageEncode | If the message authoritativeattribute is set to 0, the 
encoded bytes will have AA bit 0. | 
| Method | test_nonAuthoritativeMessageDecode | The dns.RRHeaderinstances created by a message from a non-authoritative message byte string
are marked as not authoritative. | 
| Method | test_authoritativeMessageEncode | If the message authoritativeattribute is set to 1, the 
encoded bytes will have AA bit 1. | 
| Method | test_authoritativeMessageDecode | The message and its dns.RRHeaderinstances created bydecodefrom an authoritative message byte
string, are marked as authoritative. | 
| Method | test_truncatedMessageEncode | If the message truncattribute is set to 1 the encoded 
bytes will have TR bit 1. | 
| Method | test_truncatedMessageDecode | The message instance created by decoding a truncated message is marked as truncated. | 
A NULL record with an arbitrary payload can be encoded and decoded as part of a message.
If the message authoritative attribute is set to 0, the 
encoded bytes will have AA bit 0.
The dns.RRHeader 
instances created by a message from a non-authoritative message byte string
are marked as not authoritative.
If the message authoritative attribute is set to 1, the 
encoded bytes will have AA bit 1.
The message and its dns.RRHeader 
instances created by decode from an authoritative message byte
string, are marked as authoritative.