Test that the static URL builde and template tag work.
(self)
| 77 | self.assertEquals(robots_txt, f.read()) |
| 78 | |
| 79 | def testStaticLoader(self): |
| 80 | """ |
| 81 | Test that the static URL builde and template tag work. |
| 82 | """ |
| 83 | static = '/static/css/style.css' |
| 84 | page = "{%% static '%s' %%}" % static |
| 85 | |
| 86 | |
| 87 | with open(os.path.join(self.path, 'pages', 'staticpage.html'), "w") as dst: |
| 88 | dst.write(page) |
| 89 | |
| 90 | self.site.build() |
| 91 | |
| 92 | with open(os.path.join(self.path, '.build', 'staticpage.html'), "rU") as obtained: |
| 93 | self.assertEqual(self.site.get_url_for_static(static), obtained.read()) |
| 94 | |
| 95 | def test_current_page(self): |
| 96 | """ |
nothing calls this directly
no test coverage detected