mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
Updates tests
This commit is contained in:
parent
bffde6703c
commit
a6604c197d
1 changed files with 6 additions and 6 deletions
|
@ -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"""
|
||||
|
|
Loading…
Reference in a new issue