Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/d/j/django-templation-HEAD/tests/tests/test_views.py   django-templation(Download)
from django.conf import settings
from templation.settings import get_resource_model
from templation.views import static_view, server_error
from templation.locals import thread_locals
from . import BaseTest
        except ValueError:
            request = self.factory.get('/index/{0}/'.format(self.resource.id), follow=True)
            view = server_error(request)
            self.assertEqual(view.content, '<h1>Server Error (500)</h1>')
 
            request.user = self.user
            thread_locals.resource = self.resource
            view = server_error(request)
            self.failUnless('<h1>TemplateSyntaxError at /index/1234/</h1>' in view.content)