'A custom CSRF_FAILURE_TEMPLATE_NAME is used.'

@override_settings(TEMPLATES=[{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'OPTIONS': {'loaders': [('django.template.loaders.locmem.Loader', {CSRF_FAILURE_TEMPLATE_NAME: 'Test    template    for    CSRF    failure'})]}}])
def test_custom_template(self):

    response = self.client.post('/')
    self.assertContains(response, 'Test    template    for    CSRF    failure', status_code=403)
