mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 09:00:33 +00:00
Updates unit tests
This commit is contained in:
parent
fe7163be33
commit
2d3ec93086
1 changed files with 7 additions and 7 deletions
|
@ -132,7 +132,7 @@ class Status(TestCase):
|
||||||
activity = status.to_activity()
|
activity = status.to_activity()
|
||||||
self.assertEqual(activity["id"], status.remote_id)
|
self.assertEqual(activity["id"], status.remote_id)
|
||||||
self.assertEqual(activity["type"], "Note")
|
self.assertEqual(activity["type"], "Note")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["sensitive"], False)
|
self.assertEqual(activity["sensitive"], False)
|
||||||
|
|
||||||
def test_status_to_activity_tombstone(self, *_):
|
def test_status_to_activity_tombstone(self, *_):
|
||||||
|
@ -156,7 +156,7 @@ class Status(TestCase):
|
||||||
activity = status.to_activity(pure=True)
|
activity = status.to_activity(pure=True)
|
||||||
self.assertEqual(activity["id"], status.remote_id)
|
self.assertEqual(activity["id"], status.remote_id)
|
||||||
self.assertEqual(activity["type"], "Note")
|
self.assertEqual(activity["type"], "Note")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["sensitive"], False)
|
self.assertEqual(activity["sensitive"], False)
|
||||||
self.assertEqual(activity["attachment"], [])
|
self.assertEqual(activity["attachment"], [])
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class Status(TestCase):
|
||||||
activity = status.to_activity()
|
activity = status.to_activity()
|
||||||
self.assertEqual(activity["id"], status.remote_id)
|
self.assertEqual(activity["id"], status.remote_id)
|
||||||
self.assertEqual(activity["type"], "GeneratedNote")
|
self.assertEqual(activity["type"], "GeneratedNote")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["sensitive"], False)
|
self.assertEqual(activity["sensitive"], False)
|
||||||
self.assertEqual(len(activity["tag"]), 2)
|
self.assertEqual(len(activity["tag"]), 2)
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ class Status(TestCase):
|
||||||
activity = status.to_activity()
|
activity = status.to_activity()
|
||||||
self.assertEqual(activity["id"], status.remote_id)
|
self.assertEqual(activity["id"], status.remote_id)
|
||||||
self.assertEqual(activity["type"], "Comment")
|
self.assertEqual(activity["type"], "Comment")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
||||||
|
|
||||||
def test_comment_to_pure_activity(self, *_):
|
def test_comment_to_pure_activity(self, *_):
|
||||||
|
@ -243,8 +243,8 @@ class Status(TestCase):
|
||||||
activity = status.to_activity()
|
activity = status.to_activity()
|
||||||
self.assertEqual(activity["id"], status.remote_id)
|
self.assertEqual(activity["id"], status.remote_id)
|
||||||
self.assertEqual(activity["type"], "Quotation")
|
self.assertEqual(activity["type"], "Quotation")
|
||||||
self.assertEqual(activity["quote"], "a sickening sense")
|
self.assertEqual(activity["quote"], "<p>a sickening sense</p>")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
||||||
|
|
||||||
def test_quotation_to_pure_activity(self, *_):
|
def test_quotation_to_pure_activity(self, *_):
|
||||||
|
@ -285,7 +285,7 @@ class Status(TestCase):
|
||||||
self.assertEqual(activity["type"], "Review")
|
self.assertEqual(activity["type"], "Review")
|
||||||
self.assertEqual(activity["rating"], 3)
|
self.assertEqual(activity["rating"], 3)
|
||||||
self.assertEqual(activity["name"], "Review name")
|
self.assertEqual(activity["name"], "Review name")
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "<p>test content</p>")
|
||||||
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
self.assertEqual(activity["inReplyToBook"], self.book.remote_id)
|
||||||
|
|
||||||
def test_review_to_pure_activity(self, *_):
|
def test_review_to_pure_activity(self, *_):
|
||||||
|
|
Loading…
Reference in a new issue