X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d5e836566b0bbff5242de33acc264ca94ad11f49..0b1d7187cd243b29566418c3b09fa8043ed53bee:/src/catalogue/tests/test_visit.py diff --git a/src/catalogue/tests/test_visit.py b/src/catalogue/tests/test_visit.py index e6a83edd0..83d5e0bdc 100644 --- a/src/catalogue/tests/test_visit.py +++ b/src/catalogue/tests/test_visit.py @@ -1,4 +1,3 @@ -# -*- 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. # @@ -13,14 +12,14 @@ class VisitTest(WLTestCase): def setUp(self): WLTestCase.setUp(self) author = PersonStub(("Jane",), "Doe") - book_info = BookInfoStub(author=author, genre="Genre", - epoch='Epoch', kind="Kind", **info_args(u"A book")) + book_info = BookInfoStub(author=author, genre="Sielanka", + epoch='Epoch', kind="Kind", **info_args("A book")) self.book = models.Book.from_text_and_meta(ContentFile(''' - Theme + Sielanka Test @@ -40,33 +39,23 @@ class VisitTest(WLTestCase): 'nowe/', 'lektura/a-book/', 'lektura/a-book.html', - 'lektura/a-book/motyw/theme/', - 'motyw/theme/', + 'lektura/a-book/motyw/sielanka/', + 'motyw/sielanka/', + 'sielanka/', 'autor/jane-doe/', + 'daisy/', # 'autor/jane-doe/gatunek/genre/', - # 'autor/jane-doe/gatunek/genre/motyw/theme/', - 'b/%d/mini.pl.html' % self.book.pk, - 'b/%d/mini_nolink.pl.html' % self.book.pk, - '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, + # 'autor/jane-doe/gatunek/genre/motyw/sielanka/', ], 404: [ 'lektury/nonexistent/', # Nonexistent Collection. 'lektura/nonexistent/', # Nonexistent Book. 'lektura/nonexistent.html', # Nonexistent Book's HTML. - 'lektura/nonexistent/motyw/theme/', # Nonexistent Book's theme. + 'lektura/nonexistent/motyw/sielanka/', # Nonexistent Book's theme. 'lektura/a-book/motyw/nonexistent/', # Nonexistent theme in a Book. 'autor/nonexistent/', # Nonexistent author. 'motyw/nonexistent/', # Nonexistent theme. 'zh.json', # Nonexistent language. - 'b/%d/mini.pl.html' % (self.book.pk + 100), # Nonexistent book. - 'b/%d/mini_nolink.pl.html' % (self.book.pk + 100), # Nonexistent book. - '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/'