'Monkeypatch get_template'

def setUp(self):

    self.get_template = django.template.loader.get_template
    def get_template(template_name):
        if (template_name == u'404.html'):
            return Template(u'404:    {{    detail    }}')
        if (template_name == u'403.html'):
            return Template(u'403:    {{    detail    }}')
        raise TemplateDoesNotExist(template_name)
    django.template.loader.get_template = get_template
