From f901806574e6c758d51cb9d900538441381bfe8c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 1 Oct 2021 14:56:38 -0700 Subject: [PATCH] Test to ensure incoming statuses have thread ids --- bookwyrm/tests/views/inbox/test_inbox_create.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bookwyrm/tests/views/inbox/test_inbox_create.py b/bookwyrm/tests/views/inbox/test_inbox_create.py index 3e1a22ae..76fd366c 100644 --- a/bookwyrm/tests/views/inbox/test_inbox_create.py +++ b/bookwyrm/tests/views/inbox/test_inbox_create.py @@ -72,6 +72,7 @@ class InboxCreate(TestCase): self.assertEqual(status.quote, "quote body") self.assertEqual(status.content, "commentary") self.assertEqual(status.user, self.local_user) + self.assertEqual(status.thread_id, status.id) # while we're here, lets ensure we avoid dupes views.inbox.activity_task(activity) @@ -144,6 +145,7 @@ class InboxCreate(TestCase): status = models.Status.objects.last() self.assertEqual(status.content, "test content in note") self.assertEqual(status.reply_parent, parent_status) + self.assertEqual(status.thread_id, parent_status.id) self.assertTrue(models.Notification.objects.filter(user=self.local_user)) self.assertEqual(models.Notification.objects.get().notification_type, "REPLY")