Tests for twisted.names.dns.

Class DomainStringTests No class docstring; 5/5 methods documented
Class Ord2ByteTests Tests for dns._ord2bytes.
Class Str2TimeTests Tests for dns.str2name.
Class NameTests Tests for Name, the representation of a single domain name with support for encoding into and decoding from DNS message format.
Class RoundtripDNSTests Encoding and then decoding various objects.
Class MessageTests Tests for twisted.names.dns.Message.
Class MessageComparisonTests Tests for the rich comparison of dns.Message instances.
Class TestController Pretend to be a DNS query processor for a DNSDatagramProtocol.
Class DatagramProtocolTests Test various aspects of dns.DNSDatagramProtocol.
Class TestTCPController Pretend to be a DNS query processor for a DNSProtocol.
Class DNSProtocolTests Test various aspects of dns.DNSProtocol.
Class ReprTests Tests for the __repr__ implementation of record classes.
Class EqualityTests Tests for the equality and non-equality behavior of record classes.
Class RRHeaderTests Tests for twisted.names.dns.RRHeader.
Class NameToLabelsTests Tests for twisted.names.dns._nameToLabels.
Function assertIsSubdomainOf Assert that descendant *is* a subdomain of ancestor.
Function assertIsNotSubdomainOf Assert that descendant *is not* a subdomain of ancestor.
Class IsSubdomainOfTests Tests for twisted.names.dns._isSubdomainOf.
Class OPTNonStandardAttributes Generate byte and instance representations of an dns._OPTHeader where all attributes are set to non-default values.
Class OPTHeaderTests Tests for twisted.names.dns._OPTHeader.
Class OPTVariableOptionTests Tests for dns._OPTVariableOption.
Class RaisedArgs An exception which can be raised by fakes to test that the fake is called with expected arguments.
Class MessageEmpty Generate byte string and constructor arguments for an empty dns._EDNSMessage.
Class MessageTruncated An empty response message whose TR bit is set to 1.
Class MessageNonAuthoritative A minimal non-authoritative message.
Class MessageAuthoritative A minimal authoritative message.
Class MessageComplete An example of a fully populated non-edns response message.
Class MessageEDNSQuery A minimal EDNS query message.
Class MessageEDNSComplete An example of a fully populated edns response message.
Class MessageEDNSExtendedRCODE An example of an EDNS message with an extended RCODE.
Class MessageComparable A wrapper around dns.Message which is comparable so that it can be tested using some of the dns._EDNSMessage tests.
Function verifyConstructorArgument Verify that an attribute has the expected default value and that a corresponding argument passed to a constructor is assigned to that attribute.
Class ConstructorTestsMixin Helper methods for verifying default attribute values and corresponding constructor arguments.
Class CommonConstructorTestsMixin Tests for constructor arguments and their associated attributes that are common to both twisted.names.dns._EDNSMessage and dns.Message.
Class EDNSMessageConstructorTests Tests for twisted.names.dns._EDNSMessage constructor arguments that are shared with dns.Message.
Class MessageConstructorTests Tests for twisted.names.dns.Message constructor arguments that are shared with dns._EDNSMessage.
Class EDNSMessageSpecificsTests Tests for dns._EDNSMessage.
Class EDNSMessageEqualityTests Tests for equality between L(dns._EDNSMessage} instances.
Class StandardEncodingTestsMixin Tests for the encoding and decoding of various standard (not EDNS) messages.
Class EDNSMessageStandardEncodingTests Tests for the encoding and decoding of various standard (non-EDNS) messages by dns._EDNSMessage.
Class MessageStandardEncodingTests Tests for the encoding and decoding of various standard (non-EDNS) messages by dns.Message.
Class EDNSMessageEDNSEncodingTests Tests for the encoding and decoding of various EDNS messages.
Class ResponseFromMessageTests Tests for dns._responseFromMessage.
Class Foo An example class for use in dns._compactRepr tests. It follows the pattern of initialiser settable flags, fields and sections found in dns.Message and dns._EDNSMessage.
Class CompactReprTests Tests for L[dns._compactRepr}.
def assertIsSubdomainOf(testCase, descendant, ancestor):

Assert that descendant *is* a subdomain of ancestor.

ParameterstestCaseThe test case on which to run the assertions. (type: unittest.SynchronousTestCase)
descendantThe subdomain name to test. (type: str)
ancestorThe superdomain name to test. (type: str)
def assertIsNotSubdomainOf(testCase, descendant, ancestor):

Assert that descendant *is not* a subdomain of ancestor.

ParameterstestCaseThe test case on which to run the assertions. (type: unittest.SynchronousTestCase)
descendantThe subdomain name to test. (type: str)
ancestorThe superdomain name to test. (type: str)
def verifyConstructorArgument(testCase, cls, argName, defaultVal, altVal, attrName=None):

Verify that an attribute has the expected default value and that a corresponding argument passed to a constructor is assigned to that attribute.

ParameterstestCaseThe TestCase whose assert methods will be called. (type: unittest.TestCase)
clsThe constructor under test. (type: type)
argNameThe name of the constructor argument under test. (type: str)
defaultValThe expected default value of attrName / argName (type: object)
altValA value which is different from the default. Used to test that supplied constructor arguments are actually assigned to the correct attribute. (type: object)
attrNameThe name of the attribute under test if different from argName. Defaults to argName (type: str)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.