Fixes incoming tests

This commit is contained in:
Mouse Reeve 2020-12-17 13:46:32 -08:00
parent c4c01f4950
commit d024d44b79

View file

@ -473,11 +473,14 @@ class Incoming(TestCase):
'data/fr_edition.json')
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(
title='Test Book', remote_id='https://bookwyrm.social/book/5989')
del bookdata['authors']
self.assertEqual(book.title, 'Test Book')
with patch(
'bookwyrm.activitypub.base_activity.set_related_field.delay'):
incoming.handle_update_edition({'object': bookdata})