'Each header passed to the I{start_response} callable MUST be a
sequence.'

def test_headersMustEachBeSequence(self):

    header = ('key', 'value')
    def application(environ, startResponse):
        startResponse('200    OK', [iter(header)])
        return iter(())
    (request, result) = self.prepareRequest(application)
    request.requestReceived()
    def checkMessage(error):
        self.assertRegex(str(error), 'header    must    be    a    [(]str,    str[)]    tuple,    not    <(tuple_?|sequence)iterator    .+>    [(]\\1iterator[)]')
    return self.assertFailure(result, TypeError).addCallback(checkMessage)
