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

Method testStaticLoader

cactus/tests/test_basic.py:79–93  ·  view source on GitHub ↗

Test that the static URL builde and template tag work.

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 4

get_url_for_staticMethod · 0.80
readMethod · 0.80
writeMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected