'Monkeypatch get_template'

def _monkey_patch_get_template(self):

    self.get_template = django.template.loader.get_template
    def get_template(template_name, dirs=None):
        if (template_name == u'example.html'):
            return Template(u'example:    {{    object    }}')
        raise TemplateDoesNotExist(template_name)
    def select_template(template_name_list, dirs=None, using=None):
        if (template_name_list == [u'example.html']):
            return Template(u'example:    {{    object    }}')
        raise TemplateDoesNotExist(template_name_list[0])
    django.template.loader.get_template = get_template
    django.template.loader.select_template = select_template
