Test that we only parse context on HTML pages.
(self)
| 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 | """ |