Exemplo n.º 1
0
 def test_attribute_checker_with_meta(self):
     s = Site(TEST_SITE)
     s.load()
     MetaPlugin(s).begin_site()
     from hyde.ext.plugins.sorter import attributes_checker
     have_index = ["angry-post.html",
                 "another-sad-post.html",
                 "happy-post.html"]
     for r in s.content.walk_resources():
         expected = r.name in have_index
         assert attributes_checker(r, ['meta.index']) == expected
Exemplo n.º 2
0
 def test_attribute_checker_no_meta(self):
     s = Site(TEST_SITE)
     s.load()
     from hyde.ext.plugins.sorter import attributes_checker
     for r in s.content.walk_resources():
         assert not attributes_checker(r, ['meta.index'])