def test_plain_template_basic():
    """
    Ensure basic sanity with the PlainTemplate system.
    """
    with tmpdir() as tmp:
        pt1 = PlainTemplate("tests/resources/templates/plain1")
        pt1.render(tmp)
        with cd(tmp):
            for x in ["foo", "bar", "baz"]:
                assert_content(x, x)
def test_plain_template_advanced():
    """
    Ensure sanity when two PlainTemplates are rendered together,
    along with a directory.
    """
    with tmpdir() as tmp:
        pt1 = PlainTemplate("tests/resources/templates/plain1")
        pt2 = PlainTemplate("tests/resources/templates/plain2")
        pt1.render(tmp)
        pt2.render(tmp)

        values = {"foo": "foo", "bar": "not bar", "baz": "baz", "kruft/flip": "flip"}

        with cd(tmp):
            for entry in values:
                content = values[entry]
                assert_content(entry, content)