

def test_flattener_fixes_nodes(self):
    s = Site(TEST_SITE)
    cfg = "\n        plugins:\n            - hyde.ext.plugins.structure.FlattenerPlugin\n        flattener:\n            items:\n                -\n                    source: blog\n                    target: ''\n        "
    import yaml
    s.config = Config(TEST_SITE, config_dict=yaml.load(cfg))
    s.load()
    gen = Generator(s)
    gen.generate_all()
    blog_node = s.content.node_from_relative_path('blog')
    assert blog_node
    assert (blog_node.url == '/')

dataset/ETHPy150Open hyde/hyde/tests/ext/test_flattener.py TestFlattner.test_flattener_fixes_nodes/original