Fixes import job creates in tests

This commit is contained in:
Mouse Reeve 2021-11-13 10:16:05 -08:00
parent 3bdda973bc
commit 232e051dcb
3 changed files with 8 additions and 4 deletions

View file

@ -108,7 +108,9 @@ class GoodreadsImport(TestCase):
@patch("bookwyrm.activitystreams.add_status_task.delay")
def test_handle_imported_book_review(self, *_):
"""goodreads review import"""
import_job = self.importer.create_job(self.local_user, self.csv, True, "public")
import_job = self.importer.create_job(
self.local_user, self.csv, True, "unlisted"
)
import_item = import_job.items.get(index=2)
import_item.book = self.book
import_item.save()
@ -126,7 +128,7 @@ class GoodreadsImport(TestCase):
def test_handle_imported_book_rating(self, *_):
"""goodreads rating import"""
import_job = self.importer.create_job(
self.local_user, self.csv, False, "public"
self.local_user, self.csv, True, "unlisted"
)
import_item = import_job.items.filter(index=0).first()
import_item.book = self.book

View file

@ -138,7 +138,9 @@ class LibrarythingImport(TestCase):
@patch("bookwyrm.activitystreams.add_status_task.delay")
def test_handle_imported_book_review(self, *_):
"""librarything review import"""
import_job = self.importer.create_job(self.local_user, self.csv, True, "public")
import_job = self.importer.create_job(
self.local_user, self.csv, True, "unlisted"
)
import_item = import_job.items.filter(index=0).first()
import_item.book = self.book
import_item.save()

View file

@ -83,7 +83,7 @@ class StorygraphImport(TestCase):
def test_handle_imported_book_rating(self, *_):
"""storygraph rating import"""
import_job = self.importer.create_job(
self.local_user, self.csv, False, "public"
self.local_user, self.csv, True, "unlisted"
)
import_item = import_job.items.filter(index=1).first()
import_item.book = self.book