コード例 #1
0
def test_template_voodoo():
    """
    Make sure the getattr hack still works right.
    """
    templs = {
        "PlainTemplate": PlainTemplate,
        "JinjaTemplate": JinjaTemplate,
        "DebianShim": DebianShim,
        "UpstreamShim": UpstreamShim,
        "FakeName": None,
    }
    tplm = TemplateManager()
    for templ in templs:
        assert tplm._get_template(templ) == templs[templ]