Test that we build the proper files.
(self)
| 9 | |
| 10 | class TestSite(SiteTestCase): |
| 11 | def testBuild(self): |
| 12 | """ |
| 13 | Test that we build the proper files. |
| 14 | """ |
| 15 | self.site.build() |
| 16 | |
| 17 | # Make sure we build to .build and not build |
| 18 | self.assertEqual(os.path.exists(os.path.join(self.path, 'build')), False) |
| 19 | |
| 20 | self.assertEqual( |
| 21 | sorted([path_to_url(path) for path in fileList(os.path.join(self.path, '.build'), relative=True)]), |
| 22 | sorted([ |
| 23 | 'error.html', |
| 24 | 'index.html', |
| 25 | 'robots.txt', |
| 26 | 'sitemap.xml', |
| 27 | self.site.get_url_for_static('/static/css/style.css')[1:], # Strip the initial / |
| 28 | self.site.get_url_for_static('/static/images/favicon.ico')[1:], # Strip the initial / |
| 29 | self.site.get_url_for_static('/static/js/main.js')[1:], # Strip the initial / |
| 30 | ])) |
| 31 | |
| 32 | def testRenderPage(self): |
| 33 | """ |
nothing calls this directly
no test coverage detected