Esempio n. 1
0
 def test_attribute_checker_with_meta(self):
     s = Site(TEST_SITE)
     s.load()
     MetaPlugin(s).begin_site()
     from hyde.ext.plugins.meta 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
Esempio n. 2
0
 def test_attribute_checker_with_meta(self):
     s = Site(TEST_SITE)
     s.load()
     MetaPlugin(s).begin_site()
     from hyde.ext.plugins.meta 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
Esempio n. 3
0
 def test_attribute_checker_no_meta(self):
     s = Site(TEST_SITE)
     s.load()
     from hyde.ext.plugins.meta import attributes_checker
     for r in s.content.walk_resources():
         assert not attributes_checker(r, ['meta.index'])
Esempio n. 4
0
 def test_attribute_checker_no_meta(self):
     s = Site(TEST_SITE)
     s.load()
     from hyde.ext.plugins.meta import attributes_checker
     for r in s.content.walk_resources():
         assert not attributes_checker(r, ['meta.index'])