mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 06:06:34 +00:00
Adds test for followers only privacy level
This commit is contained in:
parent
7544647b5b
commit
f308b7793d
1 changed files with 11 additions and 0 deletions
|
@ -185,6 +185,17 @@ class ModelFields(TestCase):
|
|||
instance.set_field_from_activity(model_instance, data)
|
||||
self.assertEqual(model_instance.privacy_field, "unlisted")
|
||||
|
||||
data.to = ["http://user_remote/followers"]
|
||||
data.cc = []
|
||||
instance.set_field_from_activity(model_instance, data)
|
||||
self.assertEqual(model_instance.privacy_field, "followers")
|
||||
|
||||
data.to = ["http://user_remote/followers"]
|
||||
data.cc = ["http://mentioned_user/remote_id"]
|
||||
instance.set_field_from_activity(model_instance, data)
|
||||
self.assertEqual(model_instance.privacy_field, "followers")
|
||||
|
||||
|
||||
@patch("bookwyrm.models.activitypub_mixin.ObjectMixin.broadcast")
|
||||
@patch("bookwyrm.activitystreams.ActivityStream.add_status")
|
||||
def test_privacy_field_set_activity_from_field(self, *_):
|
||||
|
|
Loading…
Reference in a new issue