def test_hostHeaderRequired(self):
        request = Request('GET', '/', Headers({}), None)
        self.assertRaises(BadHeaders, request.writeTo, self.transport)
        self.assertEqual(self.transport.value(), '')

        request = Request('GET', '/', Headers({'Host': ['example.com', 'example.org']}), None)
        self.assertRaises(BadHeaders, request.writeTo, self.transport)
        self.assertEqual(self.transport.value(), '')
L{Request.writeTo} raises L{BadHeaders} if there is not exactly one
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/RequestTests.test_hostHeaderRequired