X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ce8bb4b693d45e5e33f94cbf5fb381acb8d593ad..2ae6c6bc078cdc7ec6e3131bbbb430714bf36230:/apps/catalogue/tests/book_import.py diff --git a/apps/catalogue/tests/book_import.py b/apps/catalogue/tests/book_import.py index 09d0e1e79..76061d05a 100644 --- a/apps/catalogue/tests/book_import.py +++ b/apps/catalogue/tests/book_import.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import with_statement +from django.conf import settings from django.core.files.base import ContentFile, File from catalogue.test_utils import * @@ -418,7 +418,7 @@ class BookImportGenerateTest(WLTestCase): self.book = models.Book.from_xml_file(xml) def test_gen_pdf(self): - self.book.build_pdf() + self.book.pdf_file.build() book = models.Book.objects.get(pk=self.book.pk) self.assertTrue(path.exists(book.pdf_file.path)) @@ -426,7 +426,7 @@ class BookImportGenerateTest(WLTestCase): """This book contains a child.""" xml = path.join(path.dirname(__file__), "files/fraszki.xml") parent = models.Book.from_xml_file(xml) - parent.build_pdf() + parent.pdf_file.build() parent = models.Book.objects.get(pk=parent.pk) self.assertTrue(path.exists(parent.pdf_file.path))