mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-24 16:08:07 +00:00
Fixes incoming tests
This commit is contained in:
parent
c4c01f4950
commit
d024d44b79
1 changed files with 3 additions and 0 deletions
|
@ -473,11 +473,14 @@ class Incoming(TestCase):
|
||||||
'data/fr_edition.json')
|
'data/fr_edition.json')
|
||||||
bookdata = json.loads(datafile.read_bytes())
|
bookdata = json.loads(datafile.read_bytes())
|
||||||
|
|
||||||
|
models.Work.objects.create(
|
||||||
|
title='Test Work', remote_id='https://bookwyrm.social/book/5988')
|
||||||
book = models.Edition.objects.create(
|
book = models.Edition.objects.create(
|
||||||
title='Test Book', remote_id='https://bookwyrm.social/book/5989')
|
title='Test Book', remote_id='https://bookwyrm.social/book/5989')
|
||||||
|
|
||||||
del bookdata['authors']
|
del bookdata['authors']
|
||||||
self.assertEqual(book.title, 'Test Book')
|
self.assertEqual(book.title, 'Test Book')
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
'bookwyrm.activitypub.base_activity.set_related_field.delay'):
|
'bookwyrm.activitypub.base_activity.set_related_field.delay'):
|
||||||
incoming.handle_update_edition({'object': bookdata})
|
incoming.handle_update_edition({'object': bookdata})
|
||||||
|
|
Loading…
Reference in a new issue