

def test_can_flatten(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()
    assert (not s.config.deploy_root_path.child_folder('blog').exists)
    assert File(s.config.deploy_root_path.child('merry-christmas.html')).exists

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