'test that an included template also has its full hierarchy invoked.'

def test_includes(self):

    collection = lookup.TemplateLookup()
    collection.put_string('base', '\n                                <%def    name="a()">base_a</%def>\n                                This    is    the    base.\n                                ${next.body()}\n                                End    base.\n')
    collection.put_string('index', '\n                                <%inherit    file="base"/>\n                                this    is    index.\n                                a    is:    ${self.a()}\n                                <%include    file="secondary"/>\n')
    collection.put_string('secondary', '\n                                <%inherit    file="base"/>\n                                this    is    secondary.\n                                a    is:    ${self.a()}\n')
    assert (result_lines(collection.get_template('index').render()) == ['This    is    the    base.', 'this    is    index.', 'a    is:    base_a', 'This    is    the    base.', 'this    is    secondary.', 'a    is:    base_a', 'End    base.', 'End    base.'])
