kopia lustrzana https://gitlab.com/jaywink/federation
Add a pyfed context to all AP payloads
rodzic
564f917f7a
commit
5045127072
|
@ -2,10 +2,12 @@ CONTEXT_ACTIVITYSTREAMS = "https://www.w3.org/ns/activitystreams"
|
|||
CONTEXT_HASHTAG = {"Hashtag": "as:Hashtag"}
|
||||
CONTEXT_LD_SIGNATURES = "https://w3id.org/security/v1"
|
||||
CONTEXT_MANUALLY_APPROVES_FOLLOWERS = {"manuallyApprovesFollowers": "as:manuallyApprovesFollowers"}
|
||||
CONTEXT_PYTHON_FEDERATION = {"pyfed": "https://jasonrobinson.me/ns/federation"}
|
||||
CONTEXT_SENSITIVE = {"sensitive": "as:sensitive"}
|
||||
|
||||
CONTEXTS_DEFAULT = [
|
||||
CONTEXT_ACTIVITYSTREAMS,
|
||||
CONTEXT_PYTHON_FEDERATION,
|
||||
]
|
||||
|
||||
NAMESPACE_PUBLIC = "https://www.w3.org/ns/activitystreams#Public"
|
||||
|
|
|
@ -42,6 +42,7 @@ class TestEntitiesConvertToAS2:
|
|||
assert result == {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{"pyfed": "https://jasonrobinson.me/ns/federation"},
|
||||
{'Hashtag': 'as:Hashtag'},
|
||||
'https://w3id.org/security/v1',
|
||||
{'sensitive': 'as:sensitive'},
|
||||
|
@ -99,6 +100,7 @@ class TestEntitiesConvertToAS2:
|
|||
assert result == {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{"pyfed": "https://jasonrobinson.me/ns/federation"},
|
||||
{'Hashtag': 'as:Hashtag'},
|
||||
'https://w3id.org/security/v1',
|
||||
{'sensitive': 'as:sensitive'},
|
||||
|
@ -131,6 +133,7 @@ class TestEntitiesConvertToAS2:
|
|||
assert result == {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{"pyfed": "https://jasonrobinson.me/ns/federation"},
|
||||
{'Hashtag': 'as:Hashtag'},
|
||||
'https://w3id.org/security/v1',
|
||||
{'sensitive': 'as:sensitive'},
|
||||
|
@ -209,6 +212,7 @@ class TestEntitiesConvertToAS2:
|
|||
assert result == {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{"pyfed": "https://jasonrobinson.me/ns/federation"},
|
||||
],
|
||||
'type': 'Delete',
|
||||
'id': 'http://127.0.0.1:8000/post/123456/#delete',
|
||||
|
@ -225,6 +229,7 @@ class TestEntitiesConvertToAS2:
|
|||
assert result == {
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{"pyfed": "https://jasonrobinson.me/ns/federation"},
|
||||
],
|
||||
'type': 'Undo',
|
||||
'id': 'http://127.0.0.1:8000/post/123456/#delete',
|
||||
|
|
Ładowanie…
Reference in New Issue