'L{NameVirtualHost.render} returns the result of rendering the
instance\'s C{default} if it is not L{None} and there is no host
matching the value of the I{Host} header in the request.'

def test_renderWithUnknownHost(self):

    virtualHostResource = NameVirtualHost()
    virtualHostResource.default = Data('correct    data', '')
    request = DummyRequest([''])
    request.requestHeaders.addRawHeader('host', 'example.com')
    d = _render(virtualHostResource, request)
    def cbRendered(ignored):
        self.assertEqual(''.join(request.written), 'correct    data')
    d.addCallback(cbRendered)
    return d
