This commit is contained in:
Mouse Reeve 2022-11-05 18:16:59 -07:00
parent 817047bdeb
commit 6e748c5476
2 changed files with 4 additions and 3 deletions

View file

@ -86,7 +86,7 @@
{% if not imports %}
<tr>
<td colspan="6">
<em>{% trans "No matching imports founds." %} </em>
<em>{% trans "No matching imports found." %} </em>
</td>
</tr>
{% endif %}

View file

@ -14,6 +14,7 @@ from bookwyrm.tests.validate_html import validate_html
class ImportViews(TestCase):
"""goodreads import views"""
# pylint: disable=invalid-name
def setUp(self):
"""we need basic test data and mocks"""
self.factory = RequestFactory()
@ -84,7 +85,7 @@ class ImportViews(TestCase):
request = self.factory.post("", form.data)
request.user = self.local_user
with patch("bookwyrm.importers.Importer.start_import"):
with patch("bookwyrm.models.import_job.ImportJob.start_job"):
view(request)
job = models.ImportJob.objects.get()
self.assertFalse(job.include_reviews)
@ -102,6 +103,6 @@ class ImportViews(TestCase):
)
request = self.factory.post("")
request.user = self.local_user
with patch("bookwyrm.importers.importer.import_item_task.delay") as mock:
with patch("bookwyrm.models.import_job.import_item_task.delay") as mock:
views.retry_item(request, job.id, item.id)
self.assertEqual(mock.call_count, 1)