Fix #737: delivering of local activities causing unintended side effects, such as rollbacking changes
This commit is contained in:
parent
ff03909ca3
commit
0afa4f2e27
5 changed files with 79 additions and 58 deletions
|
|
@ -196,6 +196,16 @@ def test_inbox_routing(factories, mocker):
|
|||
assert a.target == target
|
||||
|
||||
|
||||
def test_inbox_routing_no_handler(factories, mocker):
|
||||
router = activity.InboxRouter()
|
||||
a = factories["federation.Activity"](type="Follow")
|
||||
handler = mocker.Mock()
|
||||
router.connect({"type": "Follow"}, handler)
|
||||
|
||||
router.dispatch({"type": "Follow"}, context={"activity": a}, call_handlers=False)
|
||||
handler.assert_not_called()
|
||||
|
||||
|
||||
def test_inbox_routing_send_to_channel(factories, mocker):
|
||||
group_send = mocker.patch("funkwhale_api.common.channels.group_send")
|
||||
a = factories["federation.Activity"](type="Follow")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue