Updates tests

This commit is contained in:
Mouse Reeve 2022-12-11 13:18:19 -08:00
parent bffde6703c
commit a6604c197d

View file

@ -383,16 +383,16 @@ class ActivitypubMixins(TestCase):
self.assertEqual(page_1.partOf, "http://fish.com/")
self.assertEqual(page_1.id, "http://fish.com/?page=1")
self.assertEqual(page_1.next, "http://fish.com/?page=2")
self.assertEqual(page_1.orderedItems[0]["content"], "test status 29")
self.assertEqual(page_1.orderedItems[1]["content"], "test status 28")
self.assertEqual(page_1.orderedItems[0]["content"], "<p>test status 29</p>")
self.assertEqual(page_1.orderedItems[1]["content"], "<p>test status 28</p>")
page_2 = to_ordered_collection_page(
models.Status.objects.all(), "http://fish.com/", page=2
)
self.assertEqual(page_2.partOf, "http://fish.com/")
self.assertEqual(page_2.id, "http://fish.com/?page=2")
self.assertEqual(page_2.orderedItems[0]["content"], "test status 14")
self.assertEqual(page_2.orderedItems[-1]["content"], "test status 0")
self.assertEqual(page_2.orderedItems[0]["content"], "<p>test status 14</p>")
self.assertEqual(page_2.orderedItems[-1]["content"], "<p>test status 0</p>")
def test_to_ordered_collection(self, *_):
"""convert a queryset into an ordered collection object"""
@ -420,8 +420,8 @@ class ActivitypubMixins(TestCase):
)
self.assertEqual(page_2.partOf, "http://fish.com/")
self.assertEqual(page_2.id, "http://fish.com/?page=2")
self.assertEqual(page_2.orderedItems[0]["content"], "test status 14")
self.assertEqual(page_2.orderedItems[-1]["content"], "test status 0")
self.assertEqual(page_2.orderedItems[0]["content"], "<p>test status 14</p>")
self.assertEqual(page_2.orderedItems[-1]["content"], "<p>test status 0</p>")
def test_broadcast_task(self, *_):
"""Should be calling asyncio"""