mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-28 04:21:07 +00:00
Fixes assigning authors in test
This commit is contained in:
parent
aac264c998
commit
bc64ae0504
1 changed files with 5 additions and 5 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue