X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/fddf0ef87d70d72448586e1cdd844c795fdea5c5..6280673f35e13e75e81c5b7821bd2a44a1831eab:/apps/catalogue/tests/templatetags.py diff --git a/apps/catalogue/tests/templatetags.py b/apps/catalogue/tests/templatetags.py index 5b1283c10..a66d604de 100644 --- a/apps/catalogue/tests/templatetags.py +++ b/apps/catalogue/tests/templatetags.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from catalogue import models from catalogue.templatetags import catalogue_tags from catalogue.test_utils import * @@ -10,11 +13,11 @@ class BookDescTests(WLTestCase): def setUp(self): WLTestCase.setUp(self) - author = PersonStub(("Common",), "Man") + authors = PersonStub(("Common",), "Man"), PersonStub(("Jane",), "Doe") - child_info = BookInfoStub(author=author, genre="Genre", epoch='Epoch', kind="Kind", + child_info = BookInfoStub(authors=authors, genre="Genre", epoch='Epoch', kind="Kind", **info_args(u"Child")) - parent_info = BookInfoStub(author=author, genre="Genre", epoch='Epoch', kind="Kind", + parent_info = BookInfoStub(authors=authors, genre="Genre", epoch='Epoch', kind="Kind", parts=[child_info.url], **info_args(u"Parent")) @@ -24,4 +27,4 @@ class BookDescTests(WLTestCase): def test_book_desc(self): """ book description should return authors, ancestors, book """ - self.assertEqual(catalogue_tags.book_title(self.child), 'Common Man, Parent, Child') + self.assertEqual(catalogue_tags.book_title(self.child), 'Jane Doe, Common Man, Parent, Child')