module documentation

Test cases for twisted.names.server.

Class DNSServerFactoryTests Tests for server.DNSServerFactory.
Class NoopProtocol A partial fake dns.DNSProtocolMixin with a noop writeMessage method.
Class NoResponseDNSServerFactory A server.DNSServerFactory subclass which does not attempt to reply to any received messages.
Class RaisingCache A partial fake twisted.names.cache.Cache whose methods raise an exception containing the supplied arguments.
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 RaisingResolver A partial fake IResolver whose methods raise an exception containing the supplied arguments.
Exception RaisedArguments An exception containing the arguments raised by raiser.
Function assertLogMessage Assert that the callable logs the expected messages when called.
Function raiser Raise a RaisedArguments exception containing the supplied arguments.
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.

Parameters
testCase:unittest.SynchronousTestCaseThe test case controlling the test which triggers the logged messages and on which assertions will be called.
expectedMessages:listA list of the expected log messages
callable:callableThe function which is expected to produce the expectedMessages when called.
*args:listPositional arguments to be passed to callable.
**kwargs:dictKeyword arguments to be passed to callable.
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.