'Resolve a hostname by looking it up in the C{names} dictionary.'

def resolve(self, hostname):

    try:
        return defer.succeed(self.names[hostname])
    except KeyError:
        return defer.fail(DNSLookupError(("FakeResolverReactor    couldn't    find    " + hostname.decode('utf-8'))))
