Test that page context is parsed and uses in the pages.
(self)
| 47 | self.assertEqual(expected.read(), obtained.read()) |
| 48 | |
| 49 | def testPageContext(self): |
| 50 | """ |
| 51 | Test that page context is parsed and uses in the pages. |
| 52 | """ |
| 53 | |
| 54 | shutil.copy( |
| 55 | os.path.join('cactus', 'tests', 'data', "koenpage-in.html"), |
| 56 | os.path.join(self.path, 'pages', 'koenpage.html') |
| 57 | ) |
| 58 | |
| 59 | self.site.build() |
| 60 | |
| 61 | with open(os.path.join('cactus', 'tests', 'data', 'koenpage-out.html'), "rU") as expected: |
| 62 | with open(os.path.join(self.path, '.build', 'koenpage.html'), "rU") as obtained: |
| 63 | self.assertEqual(expected.read(), obtained.read()) |
| 64 | |
| 65 | def test_html_only_context(self): |
| 66 | """ |