'An invalid request is rejected with a localized error message.'

@override_settings(USE_I18N=True, MIDDLEWARE=['django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware'])
def test_translation(self):

    response = self.client.post('/')
    self.assertContains(response, 'Forbidden', status_code=403)
    self.assertContains(response, 'CSRF    verification    failed.    Request    aborted.', status_code=403)
    with self.settings(LANGUAGE_CODE='nl'):
        with override('en-us'):
            response = self.client.post('/')
            self.assertContains(response, 'Verboden', status_code=403)
            self.assertContains(response, 'CSRF-verificatie    mislukt.    Verzoek    afgebroken.', status_code=403)
