mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 11:49:24 +02:00
Added follow model and factory
This commit is contained in:
parent
6aa6f1d8f8
commit
f19418d2c2
7 changed files with 99 additions and 2 deletions
|
@ -243,6 +243,7 @@ class TestActor(SystemActor):
|
|||
# on a follow we:
|
||||
# 1. send the accept answer
|
||||
# 2. follow back
|
||||
#
|
||||
test_actor = self.get_actor_instance()
|
||||
accept_uuid = uuid.uuid4()
|
||||
accept = activity.get_accept_follow(
|
||||
|
@ -254,6 +255,12 @@ class TestActor(SystemActor):
|
|||
accept,
|
||||
to=[ac['actor']],
|
||||
on_behalf_of=test_actor)
|
||||
# we persist the sender in database
|
||||
sender.save()
|
||||
models.Follow.objects.get_or_create(
|
||||
actor=sender,
|
||||
target=test_actor,
|
||||
)
|
||||
follow_uuid = uuid.uuid4()
|
||||
follow = activity.get_follow(
|
||||
follow_id=follow_uuid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue