X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/073bc5dd763d0c181198af92fd5a2d8201d74679..6a1e5dde9ba28802a03c8a0a61c1dc13e2252c31:/apps/catalogue/tests/book_import.py diff --git a/apps/catalogue/tests/book_import.py b/apps/catalogue/tests/book_import.py index 66487d899..f65d8807a 100644 --- a/apps/catalogue/tests/book_import.py +++ b/apps/catalogue/tests/book_import.py @@ -211,6 +211,15 @@ class ChildImportTests(WLTestCase): **info_args("Parent") ) + def test_child(self): + TEXT = """""" + child = models.Book.from_text_and_meta(ContentFile(TEXT), self.child_info) + parent = models.Book.from_text_and_meta(ContentFile(TEXT), self.parent_info) + author = parent.tags.get(category='author') + books = self.client.get(author.get_absolute_url()).context['object_list'] + self.assertEqual(len(books), 1, + "Only parent book should be visible on author's page") + def test_child_replace(self): PARENT_TEXT = """""" CHILD_TEXT = """