fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[redakcja.git]
/
src
/
documents
/
tests
/
test_publish.py
diff --git
a/src/documents/tests/test_publish.py
b/src/documents/tests/test_publish.py
index
b59136a
..
4e6592a
100644
(file)
--- a/
src/documents/tests/test_publish.py
+++ b/
src/documents/tests/test_publish.py
@@
-5,7
+5,7
@@
from documents.test_utils import get_fixture
from documents.test_utils import get_fixture
-from mock import patch
+from
unittest.
mock import patch
from django.test import TestCase
from django.contrib.auth.models import User
from documents.models import Book
from django.test import TestCase
from django.contrib.auth.models import User
from documents.models import Book
@@
-26,7
+26,16
@@
class PublishTests(TestCase):
def test_publish(self, api_call):
self.book[0].head.set_publishable(True)
self.book.publish(self.user)
def test_publish(self, api_call):
self.book[0].head.set_publishable(True)
self.book.publish(self.user)
- api_call.assert_called_with(self.user, 'books/', {"book_xml": self.text1, "days": 0}, beta=False)
+ api_call.assert_called_with(
+ self.user,
+ 'books/',
+ {
+ "book_xml": self.text1,
+ "days": 0,
+ "hidden": False
+ },
+ beta=False
+ )
@patch('apiclient.api_call')
def test_publish_multiple(self, api_call):
@patch('apiclient.api_call')
def test_publish_multiple(self, api_call):
@@
-35,4
+44,13
@@
class PublishTests(TestCase):
self.book[1].commit(get_fixture('chunk2.xml'))
self.book[1].head.set_publishable(True)
self.book.publish(self.user)
self.book[1].commit(get_fixture('chunk2.xml'))
self.book[1].head.set_publishable(True)
self.book.publish(self.user)
- api_call.assert_called_with(self.user, 'books/', {"book_xml": get_fixture('expected.xml'), "days": 0}, beta=False)
+ api_call.assert_called_with(
+ self.user,
+ 'books/',
+ {
+ "book_xml": get_fixture('expected.xml'),
+ "days": 0,
+ "hidden": False
+ },
+ beta=False
+ )