'Return the result or failure on lookup.'

def _lookup(self, name, cls, qtype, timeout):

    self.lookups.append((name, cls, qtype, timeout))
    if (self.results is not None):
        return defer.succeed((self.results, [], []))
    else:
        return defer.fail(self.failure)
