X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/2d8bcd45b873aa01d43b07d0179d373e0bdc9bb5..8ebbecdeab595766e659a0116245da8a925bdfeb:/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 = """