Opened 9 years ago

Last modified 8 years ago

#6379 enhancement new

Create a verified fake resolver

Reported by: Richard Wall Owned by:
Priority: normal Milestone:
Component: names Keywords:
Cc: Branch:


twisted.names.test.test_client includes a FakeResolver class used to test the module level lookup? functions in twisted.names.client.

This fake resolver may can be used in place of:

  • source:twisted/internet/test/ FakeResolver
  • source:twisted/names/test/ FakeResolver

FakeResolver class should be moved to a new module twisted.names.fakeresolver

It needs testing, to ensure that it matches the real IResolver interface; including methods, method signatures, return types and exceptions raised.

Exarkun recommends using as the best current example of a verified fake:

  • source:trunk/twisted/python/

...and its tests:

  • source:trunk/twisted/python/test/

This idea was originally proposed in #3908 but wasn't actually needed for the resolution of that ticket.

Change History (1)

comment:1 Changed 8 years ago by Richard Wall

(In [39320]) prototype FakeResolver for testing root.Resolver(resolver) and other dns client code. refs #6095, #6379

Note: See TracTickets for help on using tickets.