Skip to content

Commit

Permalink
fix some testcase bustage
Browse files Browse the repository at this point in the history
  • Loading branch information
staffanm committed Nov 11, 2013
1 parent da779ec commit 4482695
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions doc/examples/firststeps.sh
Expand Up @@ -136,11 +136,12 @@ data/rsrc
data/rsrc/css
data/rsrc/css/ferenda.css
data/rsrc/css/main.css
data/rsrc/css/normalize.css
data/rsrc/css/normalize-1.1.3.css
data/rsrc/js
data/rsrc/js/ferenda.js
data/rsrc/js/jquery-1.9.0.js
data/rsrc/js/modernizr-2.6.2-respond-1.1.0.min.js
data/rsrc/js/jquery-1.10.2.js
data/rsrc/js/modernizr-2.6.3.js
data/rsrc/js/respond-1.3.0.js
data/rsrc/resources.xml
# end makeresources

Expand Down
2 changes: 1 addition & 1 deletion test/testDocRepo.py
Expand Up @@ -1792,7 +1792,7 @@ def test_generate_first_page(self):
# (NOTE: the first page in the first pageset (by title/a) isn't linked. The second one (by title/d) is).
self.assertEqual("http://localhost:8000/dataset/base?title=d",
tree.find(".//nav[@id='toc']").findall(".//a")[0].get("href"))
self.assertEqual("../../rsrc/css/normalize.css",
self.assertEqual("../../rsrc/css/normalize-1.1.3.css",
tree.find(".//link").get("href"))

self.assertEqual('Documents starting with "a"',
Expand Down
8 changes: 4 additions & 4 deletions test/testManager.py
Expand Up @@ -213,7 +213,7 @@ def test_makeresources(self):
'res/css/main.css'],
jsfiles=['res/js/jquery-1.10.2.js',
'res/js/modernizr-2.6.3.js',
'res/js/respond-1.3.0.min.js'],
'res/js/respond-1.3.0.js'],
sitename="Blahonga",
sitedescription="A non-default value")
self.assertEqual(want,got)
Expand All @@ -234,9 +234,9 @@ def test_makeresources(self):
sum([os.path.getsize(x) for x in ("ferenda/res/css/normalize-1.1.3.css",
"ferenda/res/css/main.css")]))
self.assertLess(os.path.getsize(self.tempdir+'/rsrc/js/combined.js'),
sum([os.path.getsize(x) for x in ("ferenda/res/js/jquery-1.10.2.0.js",
sum([os.path.getsize(x) for x in ("ferenda/res/js/jquery-1.10.2.js",
"ferenda/res/js/modernizr-2.6.3.js",
"respond-1.3.0.min.js")]))
"ferenda/res/js/respond-1.3.0.js")]))
# Test3: No combining, make sure that a non-customized
# DocumentRepository works
repo = DocumentRepository()
Expand All @@ -249,7 +249,7 @@ def test_makeresources(self):
s.join(['rsrc', 'css','ferenda.css'])],
'js':[s.join(['rsrc', 'js','jquery-1.10.2.js']),
s.join(['rsrc', 'js','modernizr-2.6.3.js']),
s.join(['rsrc', 'js','respond-1.3.0.min.js']),
s.join(['rsrc', 'js','respond-1.3.0.js']),
s.join(['rsrc', 'js','ferenda.js'])],
'xml':[s.join(['rsrc', 'resources.xml'])]
}
Expand Down
3 changes: 2 additions & 1 deletion test/testWSGI.py
Expand Up @@ -417,7 +417,8 @@ def test_search_multiple(self):
t = etree.parse(BytesIO(content))
css = t.findall("head/link[@rel='stylesheet']")
self.assertEqual(len(css),4) # normalize, main, ferenda, and fonts.googleapis.com
self.assertEqual(css[0].get('href'), '../rsrc/css/normalize.css')
self.assertEqual('../rsrc/css/normalize-1.1.3.css',
css[0].get('href'))
js = t.findall("head/script")
self.assertEqual(len(js), 4) # jquery, modernizr, respond and ferenda

Expand Down

0 comments on commit 4482695

Please sign in to comment.