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

Method testBuild

cactus/tests/test_basic.py:11–30  ·  view source on GitHub ↗

Test that we build the proper files.

(self)

Source from the content-addressed store, hash-verified

9
10class 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 """

Callers

nothing calls this directly

Calls 4

path_to_urlFunction · 0.90
fileListFunction · 0.90
get_url_for_staticMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected