1
0
Fork 0

Substitute “p.” for “page” in page progress serialization

This commit is contained in:
Adeodato Simó 2023-09-17 15:05:34 -03:00
parent 25fd7276ea
commit 1322a0c693
No known key found for this signature in database
GPG key ID: CDF447845F1A986F
2 changed files with 4 additions and 4 deletions

View file

@ -249,14 +249,14 @@ class Status(TestCase):
def test_comment_to_pure_activity(self, *_):
"""subclass of the base model version with a "pure" serializer"""
status = models.Comment.objects.create(
content="test content", user=self.local_user, book=self.book
content="test content", user=self.local_user, book=self.book, progress=27
)
activity = status.to_activity(pure=True)
self.assertEqual(activity["id"], status.remote_id)
self.assertEqual(activity["type"], "Note")
self.assertEqual(
activity["content"],
f'test content<p>(comment on <a href="{self.book.remote_id}">"Test Edition"</a>)</p>',
f'test content<p>(comment on <a href="{self.book.remote_id}">"Test Edition"</a>, p. 27)</p>',
)
self.assertEqual(activity["attachment"][0]["type"], "Document")
# self.assertTrue(