'The resolution receiver begins, and resolved hostnames are
delivered before it completes.'

def test_resolveNameDelivers(self):

    port = 80
    ipv4Host = '1.2.3.4'
    ipv6Host = '1::2::3::4'
    receiver = self.resolver.resolveHostName(self.receiver, 'example.com')
    self.assertIs(receiver, self.receiver)
    self.fakeResolverReturns.callback([(AF_INET, SOCK_STREAM, IPPROTO_TCP, '', (ipv4Host, port)), (AF_INET6, SOCK_STREAM, IPPROTO_TCP, '', (ipv6Host, port))])
    self.assertEqual(1, len(self.resolutionBeganCalls))
    self.assertEqual(self.resolutionBeganCalls[0].name, 'example.com')
    self.assertEqual(self.addressResolvedCalls, [IPv4Address('TCP', ipv4Host, port), IPv6Address('TCP', ipv6Host, port)])
    self.assertEqual(self.resolutionCompleteCallCount, 1)
