Added follow model and factory

This commit is contained in:
Eliot Berriot 2018-04-03 21:30:15 +02:00
parent 6aa6f1d8f8
commit f19418d2c2
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
7 changed files with 99 additions and 2 deletions

View file

@ -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,