'test the mechanics of an include where
the include goes outside of the path'

def test_dont_accept_relative_outside_of_root(self):

    tl = lookup.TemplateLookup(directories=[os.path.join(template_base, 'subdir')])
    index = tl.get_template('index.html')
    ctx = runtime.Context(FastEncodingBuffer())
    ctx._with_template = index
    assert_raises_message(exceptions.TemplateLookupException, 'Template    uri    "../index.html"    is    invalid    -    it    cannot    be    relative    outside    of    the    root    path', runtime._lookup_template, ctx, '../index.html', index.uri)
    assert_raises_message(exceptions.TemplateLookupException, 'Template    uri    "../othersubdir/foo.html"    is    invalid    -    it    cannot    be    relative    outside    of    the    root    path', runtime._lookup_template, ctx, '../othersubdir/foo.html', index.uri)
    t = runtime._lookup_template(ctx, 'foo/../index.html', index.uri)
