'L{_HostResource.getChild} returns the proper I{Resource} for the vhost
embedded in the URL.  Verify that returning the proper I{Resource}
required changing the I{Host} in the header.'

def test_getChild(self):

    bazroot = Data('root    data', '')
    bazuri = Data('uri    data', '')
    baztest = Data('test    data', '')
    bazuri.putChild('test', baztest)
    bazroot.putChild('uri', bazuri)
    hr = _HostResource()
    root = NameVirtualHost()
    root.default = Data('default    data', '')
    root.addHost('baz.com', bazroot)
    request = DummyRequest(['uri', 'test'])
    request.prepath = ['bar', 'http', 'baz.com']
    request.site = Site(root)
    request.isSecure = (lambda : False)
    request.host = ''
    step = hr.getChild('baz.com', request)
    self.assertIsInstance(step, Data)
    request = DummyRequest(['uri', 'test'])
    step = root.getChild('uri', request)
    self.assertIsInstance(step, NoResource)
