Add new shares/likes/replies collection for notes
This commit is contained in:
parent
848b8b23a8
commit
6711722bd0
3 changed files with 127 additions and 39 deletions
|
@ -301,8 +301,8 @@ def test_post_content_and_like():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'likes' in note
|
||||
assert len(note['likes']['items']) == 1
|
||||
assert note['likes']['items'][0]['id'] == like_id
|
||||
assert note['likes']['totalItems'] == 1
|
||||
# assert note['likes']['items'][0]['id'] == like_id
|
||||
|
||||
|
||||
def test_post_content_and_like_unlike():
|
||||
|
@ -327,8 +327,9 @@ def test_post_content_and_like_unlike():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'likes' in note
|
||||
assert len(note['likes']['items']) == 1
|
||||
assert note['likes']['items'][0]['id'] == like_id
|
||||
assert note['likes']['totalItems'] == 1
|
||||
# FIXME(tsileo): parse the collection
|
||||
# assert note['likes']['items'][0]['id'] == like_id
|
||||
|
||||
instance2.undo(like_id)
|
||||
|
||||
|
@ -338,7 +339,7 @@ def test_post_content_and_like_unlike():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'likes' in note
|
||||
assert len(note['likes']['items']) == 0
|
||||
assert note['likes']['totalItems'] == 0
|
||||
|
||||
|
||||
def test_post_content_and_boost():
|
||||
|
@ -363,8 +364,9 @@ def test_post_content_and_boost():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'shares' in note
|
||||
assert len(note['shares']['items']) == 1
|
||||
assert note['shares']['items'][0]['id'] == boost_id
|
||||
assert note['shares']['totalItems'] == 1
|
||||
# FIXME(tsileo): parse the collection
|
||||
# assert note['shares']['items'][0]['id'] == boost_id
|
||||
|
||||
|
||||
def test_post_content_and_boost_unboost():
|
||||
|
@ -389,8 +391,9 @@ def test_post_content_and_boost_unboost():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'shares' in note
|
||||
assert len(note['shares']['items']) == 1
|
||||
assert note['shares']['items'][0]['id'] == boost_id
|
||||
assert note['shares']['totalItems'] == 1
|
||||
# FIXME(tsileo): parse the collection
|
||||
# assert note['shares']['items'][0]['id'] == boost_id
|
||||
|
||||
instance2.undo(boost_id)
|
||||
|
||||
|
@ -400,7 +403,7 @@ def test_post_content_and_boost_unboost():
|
|||
|
||||
note = instance1.outbox_get(f'{create_id}/activity')
|
||||
assert 'shares' in note
|
||||
assert len(note['shares']['items']) == 0
|
||||
assert note['shares']['totalItems'] == 0
|
||||
|
||||
|
||||
def test_post_content_and_post_reply():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue