def METHOD_NAME(self):
    def disable_op(left, right):
        raise TemplateRuntimeError('that operator so does not work')
    for expr, ctx, rv in ('1 + 2', {}, '3'), ('a + 2', {'a': 2}, '4'):
        env = SandboxedEnvironment()
        env.binop_table['+'] = disable_op
        t = env.from_string('{{ %s }}' % expr)
        assert t.render(ctx) == rv
        env.intercepted_binops = frozenset(['+'])
        t = env.from_string('{{ %s }}' % expr)
        try:
            t.render(ctx)
        except TemplateRuntimeError as e:
            pass
        else:
            self.fail('expected runtime error')