diff --git a/bookwyrm/tests/importers/test_calibre_import.py b/bookwyrm/tests/importers/test_calibre_import.py index 5257caa6..aff44a24 100644 --- a/bookwyrm/tests/importers/test_calibre_import.py +++ b/bookwyrm/tests/importers/test_calibre_import.py @@ -46,11 +46,15 @@ class CalibreImport(TestCase): ) self.assertEqual(len(import_items), 1) self.assertEqual(import_items[0].index, 0) - self.assertEqual(import_items[0].normalized_data["title"], "That Ain't Witchcraft") + self.assertEqual( + import_items[0].normalized_data["title"], "That Ain't Witchcraft" + ) def test_handle_imported_book(self, *_): """calibre import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.TO_READ).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.TO_READ + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job( diff --git a/bookwyrm/tests/importers/test_goodreads_import.py b/bookwyrm/tests/importers/test_goodreads_import.py index 00c8b981..9d1c1908 100644 --- a/bookwyrm/tests/importers/test_goodreads_import.py +++ b/bookwyrm/tests/importers/test_goodreads_import.py @@ -84,7 +84,9 @@ class GoodreadsImport(TestCase): def test_handle_imported_book(self, *_): """goodreads import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.READ_FINISHED).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.READ_FINISHED + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job( diff --git a/bookwyrm/tests/importers/test_importer.py b/bookwyrm/tests/importers/test_importer.py index 5d0b9b00..c12095a4 100644 --- a/bookwyrm/tests/importers/test_importer.py +++ b/bookwyrm/tests/importers/test_importer.py @@ -174,7 +174,9 @@ class GenericImporter(TestCase): def test_handle_imported_book(self, *_): """import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.READ_FINISHED).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.READ_FINISHED + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job( @@ -193,7 +195,9 @@ class GenericImporter(TestCase): def test_handle_imported_book_already_shelved(self, *_): """import added a book, this adds related connections""" with patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async"): - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.TO_READ).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.TO_READ + ).first() models.ShelfBook.objects.create( shelf=shelf, user=self.local_user, @@ -217,12 +221,16 @@ class GenericImporter(TestCase): shelf.shelfbook_set.first().shelved_date, make_date(2020, 2, 2) ) self.assertIsNone( - self.local_user.shelf_set.get(identifier=models.Shelf.READ_FINISHED).books.first() + self.local_user.shelf_set.get( + identifier=models.Shelf.READ_FINISHED + ).books.first() ) def test_handle_import_twice(self, *_): """re-importing books""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.READ_FINISHED).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.READ_FINISHED + ).first() import_job = self.importer.create_job( self.local_user, self.csv, False, "public" ) diff --git a/bookwyrm/tests/importers/test_librarything_import.py b/bookwyrm/tests/importers/test_librarything_import.py index e976027c..3994e8cd 100644 --- a/bookwyrm/tests/importers/test_librarything_import.py +++ b/bookwyrm/tests/importers/test_librarything_import.py @@ -93,7 +93,9 @@ class LibrarythingImport(TestCase): def test_handle_imported_book(self, *_): """librarything import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.READ_FINISHED).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.READ_FINISHED + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job( @@ -117,7 +119,9 @@ class LibrarythingImport(TestCase): def test_handle_imported_book_already_shelved(self, *_): """librarything import added a book, this adds related connections""" with patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async"): - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.TO_READ).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.TO_READ + ).first() models.ShelfBook.objects.create( shelf=shelf, user=self.local_user, book=self.book ) @@ -135,7 +139,9 @@ class LibrarythingImport(TestCase): shelf.refresh_from_db() self.assertEqual(shelf.books.first(), self.book) self.assertIsNone( - self.local_user.shelf_set.get(identifier=models.Shelf.READ_FINISHED).books.first() + self.local_user.shelf_set.get( + identifier=models.Shelf.READ_FINISHED + ).books.first() ) readthrough = models.ReadThrough.objects.get(user=self.local_user) diff --git a/bookwyrm/tests/importers/test_openlibrary_import.py b/bookwyrm/tests/importers/test_openlibrary_import.py index dbd177b8..28c10e50 100644 --- a/bookwyrm/tests/importers/test_openlibrary_import.py +++ b/bookwyrm/tests/importers/test_openlibrary_import.py @@ -70,7 +70,9 @@ class OpenLibraryImport(TestCase): def test_handle_imported_book(self, *_): """openlibrary import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.READING).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.READING + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job( diff --git a/bookwyrm/tests/importers/test_storygraph_import.py b/bookwyrm/tests/importers/test_storygraph_import.py index 69788d60..afff0b21 100644 --- a/bookwyrm/tests/importers/test_storygraph_import.py +++ b/bookwyrm/tests/importers/test_storygraph_import.py @@ -62,7 +62,9 @@ class StorygraphImport(TestCase): def test_handle_imported_book(self, *_): """storygraph import added a book, this adds related connections""" - shelf = self.local_user.shelf_set.filter(identifier=models.Shelf.TO_READ).first() + shelf = self.local_user.shelf_set.filter( + identifier=models.Shelf.TO_READ + ).first() self.assertIsNone(shelf.books.first()) import_job = self.importer.create_job(