'The headers passed to the I{start_response} callable MUST be a
sequence.'

def test_headersMustBeSequence(self):

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