コード例 #1
0
def test_get_user_defined_engine():
    test_fixture = fs.path.join("tests", "fixtures", "mobanengine",
                                "sample_template_type.yml")
    template_types = open_yaml(test_fixture)
    ENGINES.register_options(template_types["template_types"])
    engine = ENGINES.get_engine("custom_jinja", ".", ".")
    eq_(engine.engine.__class__, Engine)
コード例 #2
0
def test_custom_file_extension_is_assocated_with_user_defined_engine():
    test_fixture = fs.path.join("tests", "fixtures", "mobanengine",
                                "sample_template_type.yml")
    template_types = open_yaml(test_fixture)
    ENGINES.register_options(template_types["template_types"])
    template_type = ENGINES.get_primary_key("demo_file_suffix")
    eq_("custom_jinja", template_type)
コード例 #3
0
def test_built_in_jinja2_file_extension_still_works():
    test_fixture = fs.path.join("tests", "fixtures", "mobanengine",
                                "sample_template_type.yml")
    template_types = open_yaml(test_fixture)
    ENGINES.register_options(template_types["template_types"])
    template_type = ENGINES.get_primary_key("jj2")
    eq_("jinja2", template_type)