'L{Request.writeTo} raises L{BadHeaders} if there is not exactly one
I{Host} header and writes nothing to the given transport.'

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(), '')
