From: Radek Czajka Date: Wed, 9 Jun 2010 10:13:39 +0000 (+0200) Subject: empty book shouldn't have html file (#320) X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/14bdcf6cb3e84ba5af957779b8d1164a68ee7060?ds=sidebyside;hp=--cc empty book shouldn't have html file (#320) --- 14bdcf6cb3e84ba5af957779b8d1164a68ee7060 diff --git a/apps/catalogue/tests.py b/apps/catalogue/tests.py index c2eb33675..068939806 100644 --- a/apps/catalogue/tests.py +++ b/apps/catalogue/tests.py @@ -125,7 +125,7 @@ class BookImportLogicTests(TestCase): self.assertEqual(book.title, "Default Book") self.assertEqual(book.slug, "default_book") self.assert_(book.parent is None) - self.assertTrue(book.has_html_file()) + self.assertFalse(book.has_html_file()) # no fragments generated self.assertEqual(book.fragments.count(), 0) @@ -149,6 +149,7 @@ class BookImportLogicTests(TestCase): """ book = models.Book.from_text_and_meta(ContentFile(BOOK_TEXT), self.book_info) + self.assertTrue(book.has_html_file()) self.assertEqual(book.fragments.count(), 1) self.assertEqual(book.fragments.all()[0].text, u'

Ala ma kota

\n')