'L{_fallbackNameResolution} returns a L{Deferred} that fires
with the resoution of the the host and request port.'

def test_fallbackNameResolution(self):

    from twisted.internet import reactor
    ep = endpoints.HostnameEndpoint(reactor, host='ignored', port=0)
    (host, port) = ('1.2.3.4', 1)
    resolutionDeferred = ep._fallbackNameResolution(host, port)
    def assertHostPortFamilySockType(result):
        self.assertEqual(len(result), 1)
        [(family, socktype, _, _, sockaddr)] = result
        self.assertEqual(family, AF_INET)
        self.assertEqual(socktype, SOCK_STREAM)
        self.assertEqual(sockaddr, (host, port))
    return resolutionDeferred.addCallback(assertHostPortFamilySockType)
