Fixes unit tests

This commit is contained in:
Mouse Reeve 2020-12-19 20:26:29 -08:00
parent ffa354be7c
commit 592721ec76

View file

@ -262,8 +262,8 @@ class Incoming(TestCase):
status = models.Quotation.objects.get() status = models.Quotation.objects.get()
self.assertEqual( self.assertEqual(
status.remote_id, 'https://example.com/user/mouse/quotation/13') status.remote_id, 'https://example.com/user/mouse/quotation/13')
self.assertEqual(status.quote, 'quote body') self.assertEqual(status.quote, '<p>quote body</p>')
self.assertEqual(status.content, 'commentary') self.assertEqual(status.content, '<p>commentary</p>')
self.assertEqual(status.user, self.local_user) self.assertEqual(status.user, self.local_user)
self.assertEqual(models.Status.objects.count(), 2) self.assertEqual(models.Status.objects.count(), 2)
@ -284,7 +284,7 @@ class Incoming(TestCase):
incoming.handle_create(activity) incoming.handle_create(activity)
status = models.Status.objects.last() status = models.Status.objects.last()
self.assertEqual(status.content, 'test content in note') self.assertEqual(status.content, '<p>test content in note</p>')
self.assertEqual(status.mention_users.first(), self.local_user) self.assertEqual(status.mention_users.first(), self.local_user)
self.assertTrue( self.assertTrue(
models.Notification.objects.filter(user=self.local_user).exists()) models.Notification.objects.filter(user=self.local_user).exists())
@ -306,7 +306,7 @@ class Incoming(TestCase):
incoming.handle_create(activity) incoming.handle_create(activity)
status = models.Status.objects.last() status = models.Status.objects.last()
self.assertEqual(status.content, 'test content in note') self.assertEqual(status.content, '<p>test content in note</p>')
self.assertEqual(status.reply_parent, self.status) self.assertEqual(status.reply_parent, self.status)
self.assertTrue( self.assertTrue(
models.Notification.objects.filter(user=self.local_user)) models.Notification.objects.filter(user=self.local_user))