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. |
Raise a RaisedArguments
exception containing the supplied arguments.
Used as a fake when testing the call signatures of methods and functions.
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 | The test case controlling the test which triggers the logged messages and
on which assertions will be called. (type: unittest.SynchronousTestCase) |
| expectedMessages | A list
of the expected log messages (type: list) | |
| callable | The function which is expected to produce the expectedMessages
when called. (type: callable) | |
| args | Positional arguments to be passed to callable. (type: list) | |
| kwargs | Keyword arguments to be passed to callable. (type: dict) |