'Asserts that the template with the provided name was NOT used in
rendering the response. Also usable as context manager.'

def assertTemplateNotUsed(self, response=None, template_name=None, msg_prefix=u''):

    if ((response is None) and (template_name is None)):
        raise TypeError(u'response    and/or    template_name    argument    must    be    provided')
    if msg_prefix:
        msg_prefix += u':    '
    if ((not hasattr(response, u'templates')) or ((response is None) and template_name)):
        if response:
            template_name = response
            response = None
        context = _AssertTemplateNotUsedContext(self, template_name)
        return context
    template_names = [t.name for t in response.templates]
    self.assertFalse((template_name in template_names), (msg_prefix + (u"Template    '%s'    was    used    unexpectedly    in    rendering    the    response" % template_name)))
