Exemple #1
0
 def test_localstream_get_audience_unlisted(self, *_):
     """ get a list of users that should see a status """
     status = models.Status.objects.create(user=self.local_user,
                                           content="hi",
                                           privacy="unlisted")
     users = activitystreams.LocalStream().get_audience(status)
     self.assertEqual(users, [])
Exemple #2
0
 def test_localstream_stream_users_remote_status(self, *_):
     """ get a list of users that should see a status """
     status = models.Status.objects.create(user=self.remote_user,
                                           content="hi",
                                           privacy="public")
     users = activitystreams.LocalStream().stream_users(status)
     self.assertEqual(users, [])
Exemple #3
0
 def test_localstream_get_audience_local_status(self, *_):
     """ get a list of users that should see a status """
     status = models.Status.objects.create(user=self.local_user,
                                           content="hi",
                                           privacy="public")
     users = activitystreams.LocalStream().get_audience(status)
     self.assertTrue(self.local_user in users)
     self.assertTrue(self.another_user in users)