Test cases for twisted.names.server.

Class RaisedArguments An exception containing the arguments raised by raiser.
Function raiser Raise a RaisedArguments exception containing the supplied arguments.
Class NoResponseDNSServerFactory A server.DNSServerFactory subclass which does not attempt to reply to any received messages.
Class RaisingDNSServerFactory A server.DNSServerFactory subclass whose methods raise an exception containing the supplied arguments.
Class RaisingProtocol A partial fake IProtocol whose methods raise an exception containing the supplied arguments.
Class NoopProtocol A partial fake dns.DNSProtocolMixin with a noop writeMessage method.
Class RaisingResolver A partial fake IResolver whose methods raise an exception containing the supplied arguments.
Class RaisingCache A partial fake twisted.names.cache.Cache whose methods raise an exception containing the supplied arguments.
Function assertLogMessage Assert that the callable logs the expected messages when called.
Class DNSServerFactoryTests Tests for server.DNSServerFactory.
def raiser(*args, **kwargs):

Raise a RaisedArguments exception containing the supplied arguments.

Used as a fake when testing the call signatures of methods and functions.

def assertLogMessage(testCase, expectedMessages, callable, *args, **kwargs):

Assert that the callable logs the expected messages when called.

XXX: Put this somewhere where it can be re-used elsewhere. See #6677.

ParameterstestCaseThe test case controlling the test which triggers the logged messages and on which assertions will be called. (type: unittest.SynchronousTestCase)
expectedMessagesA list of the expected log messages (type: list)
callableThe function which is expected to produce the expectedMessages when called. (type: callable)
argsPositional arguments to be passed to callable. (type: list)
kwargsKeyword arguments to be passed to callable. (type: dict)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.