Fixes assigning authors in test

This commit is contained in:
Mouse Reeve 2020-12-21 12:49:00 -08:00
parent aac264c998
commit bc64ae0504

View file

@ -26,30 +26,30 @@ class SelfConnector(TestCase):
self.work = models.Work.objects.create( self.work = models.Work.objects.create(
title='Example Work', title='Example Work',
) )
self.work.add(author) self.work.authors.add(author)
self.edition = models.Edition.objects.create( self.edition = models.Edition.objects.create(
title='Edition of Example Work', title='Edition of Example Work',
published_date=datetime.datetime(1980, 5, 10, tzinfo=timezone.utc), published_date=datetime.datetime(1980, 5, 10, tzinfo=timezone.utc),
parent_work=self.work, parent_work=self.work,
) )
self.edition.add(author) self.edition.authors.add(author)
edition = models.Edition.objects.create( edition = models.Edition.objects.create(
title='Another Edition', title='Another Edition',
parent_work=self.work, parent_work=self.work,
series='Anonymous' series='Anonymous'
) )
edition.add(author) edition.authors.add(author)
edition = models.Edition.objects.create( edition = models.Edition.objects.create(
title='More Editions', title='More Editions',
subtitle='The Anonymous Edition', subtitle='The Anonymous Edition',
parent_work=self.work, parent_work=self.work,
) )
edition.add(author) edition.authors.add(author)
edition = models.Edition.objects.create( edition = models.Edition.objects.create(
title='An Edition', title='An Edition',
parent_work=self.work parent_work=self.work
) )
edition.add(author) edition.authors.add(author)
def test_format_search_result(self): def test_format_search_result(self):