mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 08:29:55 +02:00
Follow serializer
This commit is contained in:
parent
f19418d2c2
commit
657bd4b01a
2 changed files with 48 additions and 5 deletions
|
@ -144,3 +144,22 @@ def test_webfinger_serializer():
|
|||
serializer = serializers.ActorWebfingerSerializer(actor)
|
||||
|
||||
assert serializer.data == expected
|
||||
|
||||
|
||||
def test_follow_serializer_to_ap(factories):
|
||||
follow = factories['federation.Follow'](local=True)
|
||||
serializer = serializers.FollowSerializer(follow)
|
||||
|
||||
expected = {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1',
|
||||
{},
|
||||
],
|
||||
'id': follow.get_federation_url(),
|
||||
'type': 'Follow',
|
||||
'actor': follow.actor.url,
|
||||
'object': follow.target.url,
|
||||
}
|
||||
|
||||
assert serializer.data == expected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue