#NEWLINE# def test_renderWithUnknownHost( self ) : #NEWLINE# #INDENT# "\n        L{NameVirtualHost.render} returns the result of rendering the\n        instance's C{default} if it is not C{None} and there is no host\n        matching the value of the I{Host} header in the request.\n        " #NEWLINE# virtualHostResource = NameVirtualHost ( ) #NEWLINE# virtualHostResource . default = Data ( b'correct data' , '' ) #NEWLINE# request = DummyRequest ( [ b'' ] ) #NEWLINE# request . requestHeaders . addRawHeader ( b'host' , b'example.com' ) #NEWLINE# d = _render ( virtualHostResource , self ) #NEWLINE# def cbRendered( ignored ) : #NEWLINE# #INDENT# self . assertEqual ( b'' . join ( request . written ) , b'correct data' ) #NEWLINE# #UNINDENT# d . addCallback ( cbRendered ) #NEWLINE# return d