'Tests that the code aborts when a request-body close is sent.'

def test_request_abort(self):

    Channel(u'test').send({u'reply_channel': u'test', u'http_version': u'1.1', u'method': u'POST', u'path': u'/test/', u'body': 'there_a', u'body_channel': u'test-input', u'headers': {u'host': 'example.com', u'content-type': 'application/x-www-form-urlencoded', u'content-length': '21'}}, immediately=True)
    Channel(u'test-input').send({u'closed': True}, immediately=True)
    with self.assertRaises(RequestAborted):
        AsgiRequest(self.get_next_message(u'test'))
