Skip to content

Commit e81283e

Browse files
committed
Fix tests.
1 parent 636fd34 commit e81283e

File tree

9 files changed

+19
-558
lines changed

9 files changed

+19
-558
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var
1515
coverage.xml
1616
nosetests.xml
1717
pip-log.txt
18+
/htmlcov
1819

1920
# Mac OS X garbage
2021
.DS_Store
@@ -37,4 +38,4 @@ nbproject/*
3738
node_modules
3839

3940
/static_test
40-
chromedriver.log
41+
chromedriver.log

apps/apiclient/tests.py

-23
This file was deleted.

apps/catalogue/tests/publish.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_unpublishable(self, api_call):
2828
def test_publish(self, api_call):
2929
self.book[0].head.set_publishable(True)
3030
self.book.publish(self.user)
31-
api_call.assert_called_with(self.user, 'books/', {"book_xml": self.text1})
31+
api_call.assert_called_with(self.user, 'books/', {"book_xml": self.text1, "days": 0}, beta=False)
3232

3333
@patch('apiclient.api_call')
3434
def test_publish_multiple(self, api_call):
@@ -37,4 +37,4 @@ def test_publish_multiple(self, api_call):
3737
self.book[1].commit(get_fixture('chunk2.xml'))
3838
self.book[1].head.set_publishable(True)
3939
self.book.publish(self.user)
40-
api_call.assert_called_with(self.user, 'books/', {"book_xml": get_fixture('expected.xml')})
40+
api_call.assert_called_with(self.user, 'books/', {"book_xml": get_fixture('expected.xml'), "days": 0}, beta=False)

apps/cover/tests.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def test_flickr(self):
1313
form = FlickrForm({"source_url": "https://www.flickr.com/photos/rczajka/6941928577/in/photostream"})
1414
self.assertTrue(form.is_valid())
1515
self.assertEqual(form.cleaned_data['source_url'], "https://www.flickr.com/photos/rczajka/6941928577/")
16-
self.assertEqual(form.cleaned_data['author'], "rczajka@Flickr")
16+
self.assertEqual(form.cleaned_data['author'], "Radek Czajka@Flickr")
1717
self.assertEqual(form.cleaned_data['title'], u"Pirate Stańczyk")
1818
self.assertEqual(form.cleaned_data['license_name'], "CC BY 2.0")
19-
self.assertEqual(form.cleaned_data['license_url'], "https://creativecommons.org/licenses/by/2.0/deed.en")
20-
self.assertEqual(form.cleaned_data['download_url'], "https://farm8.staticflickr.com/7069/6941928577_415844c58e_o.jpg")
19+
self.assertEqual(form.cleaned_data['license_url'], "https://creativecommons.org/licenses/by/2.0/")
20+
self.assertTrue('.staticflickr.com' in form.cleaned_data['download_url'])

apps/wiki/tests/xslt/auto/auto_test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
var $ = require('jquery');
1+
var jsdom = require("jsdom");
2+
var $ = require('jquery')(new jsdom.JSDOM().window);
23
var fs = require('fs');
34
var exec = require('child_process').exec;
45
var pd = require('pretty-data').pd;

deployment.py

-155
This file was deleted.

0 commit comments

Comments
 (0)