'Invalid boundary string should produce a "Bad Request" response, not a
server error (#23887).'

@override_settings(ROOT_URLCONF='handlers.urls')
def test_invalid_multipart_boundary(self):

    environ = RequestFactory().post('/malformed_post/').environ
    environ['CONTENT_TYPE'] = 'multipart/form-data;    boundary=WRONG\x07'
    handler = WSGIHandler()
    response = handler(environ, (lambda *a, **k: None))
    self.assertEqual(response.status_code, 400)
