mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 11:31:08 +00:00
Tests fixes
This commit is contained in:
parent
90c74f00c9
commit
673f49bf21
2 changed files with 3 additions and 3 deletions
|
@ -279,7 +279,7 @@ class Comment(BookStatus):
|
||||||
"""indicate the book in question for mastodon (or w/e) users"""
|
"""indicate the book in question for mastodon (or w/e) users"""
|
||||||
return (
|
return (
|
||||||
f'{self.content}<p>(comment on <a href="{self.book.remote_id}">'
|
f'{self.content}<p>(comment on <a href="{self.book.remote_id}">'
|
||||||
'"{self.book.title}"</a>)</p>'
|
f'"{self.book.title}"</a>)</p>'
|
||||||
)
|
)
|
||||||
|
|
||||||
activity_serializer = activitypub.Comment
|
activity_serializer = activitypub.Comment
|
||||||
|
@ -307,7 +307,7 @@ class Quotation(BookStatus):
|
||||||
quote = re.sub(r"</p>$", '"</p>', quote)
|
quote = re.sub(r"</p>$", '"</p>', quote)
|
||||||
return (
|
return (
|
||||||
f'{quote} <p>-- <a href="{self.book.remote_id}">'
|
f'{quote} <p>-- <a href="{self.book.remote_id}">'
|
||||||
'"{self.book.title}"</a></p>{self.content}'
|
f'"{self.book.title}"</a></p>{self.content}'
|
||||||
)
|
)
|
||||||
|
|
||||||
activity_serializer = activitypub.Quotation
|
activity_serializer = activitypub.Quotation
|
||||||
|
|
|
@ -36,7 +36,7 @@ class SiteModels(TestCase):
|
||||||
|
|
||||||
def test_site_settings_present(self):
|
def test_site_settings_present(self):
|
||||||
"""load site settings"""
|
"""load site settings"""
|
||||||
models.SiteSettings.objects.create(name="Fish Town")
|
models.SiteSettings.objects.create(id=1, name="Fish Town")
|
||||||
result = models.SiteSettings.get()
|
result = models.SiteSettings.get()
|
||||||
self.assertEqual(result.id, 1)
|
self.assertEqual(result.id, 1)
|
||||||
self.assertEqual(result.name, "Fish Town")
|
self.assertEqual(result.name, "Fish Town")
|
||||||
|
|
Loading…
Reference in a new issue