forked from mirrors/bookwyrm
Patches celery calls in connector tests
This commit is contained in:
parent
86060f795d
commit
1e7aa283c2
2 changed files with 11 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
''' testing book data connectors '''
|
||||
from unittest.mock import patch
|
||||
from django.test import TestCase
|
||||
import responses
|
||||
|
||||
|
@ -104,6 +105,8 @@ class AbstractConnector(TestCase):
|
|||
'https://example.com/book/abcd',
|
||||
json=self.edition_data
|
||||
)
|
||||
with patch(
|
||||
'bookwyrm.connectors.abstract_connector.load_more_data.delay'):
|
||||
result = self.connector.get_or_create_book(
|
||||
'https://example.com/book/abcd')
|
||||
self.assertEqual(result, self.book)
|
||||
|
|
|
@ -164,6 +164,8 @@ class ImportJob(TestCase):
|
|||
json={'name': 'test author'},
|
||||
status=200)
|
||||
|
||||
with patch(
|
||||
'bookwyrm.connectors.abstract_connector.load_more_data.delay'):
|
||||
with patch(
|
||||
'bookwyrm.connectors.connector_manager.first_search_result'
|
||||
) as search:
|
||||
|
|
Loading…
Reference in a new issue