Updates activity streams tests

This commit is contained in:
Mouse Reeve 2021-03-26 12:52:04 -07:00
parent ee067b7d65
commit c8118c9bf4

View file

@ -67,7 +67,7 @@ class Activitystreams(TestCase):
) )
status.mention_users.add(self.local_user) status.mention_users.add(self.local_user)
users = self.test_stream.stream_users(status) users = self.test_stream.stream_users(status)
self.assertIsNone(users) self.assertEqual(users, [])
status = models.Comment.objects.create( status = models.Comment.objects.create(
user=self.remote_user, user=self.remote_user,
@ -167,7 +167,7 @@ class Activitystreams(TestCase):
user=self.remote_user, content="hi", privacy="public" user=self.remote_user, content="hi", privacy="public"
) )
users = activitystreams.LocalStream().stream_users(status) users = activitystreams.LocalStream().stream_users(status)
self.assertIsNone(users) self.assertEqual(users, [])
def test_localstream_stream_users_local_status(self, *_): def test_localstream_stream_users_local_status(self, *_):
""" get a list of users that should see a status """ """ get a list of users that should see a status """
@ -184,7 +184,7 @@ class Activitystreams(TestCase):
user=self.local_user, content="hi", privacy="unlisted" user=self.local_user, content="hi", privacy="unlisted"
) )
users = activitystreams.LocalStream().stream_users(status) users = activitystreams.LocalStream().stream_users(status)
self.assertIsNone(users) self.assertEqual(users, [])
def test_federatedstream_stream_users(self, *_): def test_federatedstream_stream_users(self, *_):
""" get a list of users that should see a status """ """ get a list of users that should see a status """
@ -201,4 +201,4 @@ class Activitystreams(TestCase):
user=self.remote_user, content="hi", privacy="unlisted" user=self.remote_user, content="hi", privacy="unlisted"
) )
users = activitystreams.FederatedStream().stream_users(status) users = activitystreams.FederatedStream().stream_users(status)
self.assertIsNone(users) self.assertEqual(users, [])