-# -*- 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.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from catalogue import models
from catalogue.test_utils import BookInfoStub, PersonStub, WLTestCase, info_args
WLTestCase.setUp(self)
author = PersonStub(("Jane",), "Doe")
book_info = BookInfoStub(author=author, genre="Sielanka",
- epoch='Epoch', kind="Kind", **info_args(u"A book"))
+ epoch='Epoch', kind="Kind", **info_args("A book"))
self.book = models.Book.from_text_and_meta(ContentFile('''
<utwor>
<opowiadanie>
'daisy/',
# 'autor/jane-doe/gatunek/genre/',
# 'autor/jane-doe/gatunek/genre/motyw/sielanka/',
- 'b/%d/short.pl.html' % self.book.pk,
- 'b/%d/wide.pl.html' % self.book.pk,
- 'f/%d/promo.pl.html' % self.book.fragments.all()[0].pk,
- 'f/%d/short.pl.html' % self.book.fragments.all()[0].pk,
],
404: [
'lektury/nonexistent/', # Nonexistent Collection.
'autor/nonexistent/', # Nonexistent author.
'motyw/nonexistent/', # Nonexistent theme.
'zh.json', # Nonexistent language.
- 'b/%d/short.pl.html' % (self.book.pk + 100), # Nonexistent book.
- 'b/%d/wide.pl.html' % (self.book.pk + 100), # Nonexistent book.
- 'f/%d/promo.pl.html' % (self.book.fragments.all()[0].pk + 100), # Nonexistent fragment.
- 'f/%d/short.pl.html' % (self.book.fragments.all()[0].pk + 100), # Nonexistent fragment.
]
}
prefix = '/katalog/'