X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/27891467b143d11c13ae44e5051d740be6e6303c..02fe6525fe7fa7c16d6e1dfe0ca040ac07d41325:/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))