'test that namespace callables get access to the current context'

def test_context(self):

    collection = lookup.TemplateLookup()
    collection.put_string('main.html', '\n                                <%namespace    name="comp"    file="defs.html"/>\n\n                                this    is    main.        ${comp.def1()}\n                                ${comp.def2("there")}\n')
    collection.put_string('defs.html', '\n                                <%def    name="def1()">\n                                                def1:    x    is    ${x}\n                                </%def>\n\n                                <%def    name="def2(x)">\n                                                def2:    x    is    ${x}\n                                </%def>\n')
    assert (flatten_result(collection.get_template('main.html').render(x='context    x')) == 'this    is    main.    def1:    x    is    context    x    def2:    x    is    there')
