MCPcopy
hub / github.com/eudicots/Cactus / test_html_only_context

Method test_html_only_context

cactus/tests/test_basic.py:65–77  ·  view source on GitHub ↗

Test that we only parse context on HTML pages.

(self)

Source from the content-addressed store, hash-verified

63 self.assertEqual(expected.read(), obtained.read())
64
65 def test_html_only_context(self):
66 """
67 Test that we only parse context on HTML pages.
68 """
69 robots_txt = 'Disallow:/page1\nDisallow:/page2'
70
71 with open(os.path.join(self.site.path, 'pages', 'robots.txt'), 'w') as f:
72 f.write(robots_txt)
73
74 self.site.build()
75
76 with open(os.path.join(self.site.build_path, 'robots.txt'), 'rU') as f:
77 self.assertEquals(robots_txt, f.read())
78
79 def testStaticLoader(self):
80 """

Callers

nothing calls this directly

Calls 3

readMethod · 0.80
writeMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected