mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 02:59:55 +02:00
Follow request approve/refuse logic
This commit is contained in:
parent
cb9309c298
commit
e0dcb87f15
4 changed files with 97 additions and 1 deletions
|
@ -351,7 +351,7 @@ def test_library_actor_handles_follow_manual_approval(
|
|||
|
||||
def test_library_actor_handles_follow_auto_approval(
|
||||
settings, mocker, factories):
|
||||
settings.FEDERATION_MUSIC_NEEDS_APPROVAL = True
|
||||
settings.FEDERATION_MUSIC_NEEDS_APPROVAL = False
|
||||
actor = factories['federation.Actor']()
|
||||
accept_follow = mocker.patch(
|
||||
'funkwhale_api.federation.activity.accept_follow')
|
||||
|
@ -363,3 +363,8 @@ def test_library_actor_handles_follow_auto_approval(
|
|||
'object': library_actor.url,
|
||||
}
|
||||
library_actor.system_conf.post_inbox(data, actor=actor)
|
||||
|
||||
assert library_actor.received_follow_requests.count() == 0
|
||||
accept_follow.assert_called_once_with(
|
||||
library_actor, data, actor
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue