Ejemplo n.º 1
0
def test_settings_as_template_build_context():
    c = Clay(TESTS, {'who': u'world', 'FILTER_PARTIALS': False})
    name = 'test.txt.tmpl'
    sp = get_source_path(name)
    bp = get_build_path('test.txt')
    create_file(sp, u'Hello {{ who }}!')

    c.build_page(name)
    assert read_content(bp) == u'Hello world!'
Ejemplo n.º 2
0
def test_settings_as_template_build_context():
    c = Clay(TESTS, {'who': u'world', 'FILTER_PARTIALS': False})
    name = 'test.txt.tmpl'
    sp = get_source_path(name)
    bp = get_build_path('test.txt')
    create_file(sp, u'Hello {{ who }}!')

    c.build_page(name)
    assert read_content(bp) == u'Hello world!'