def METHOD_NAME(token_client, organizer, event, webhook):
    resp = token_client.patch(
        '/api/v1/organizers/{}/webhooks/{}/'.format(organizer.slug, webhook.pk),
        {
            'action_types': ['pretix.event.order.placed', 'pretix.event.order.canceled']
        },
        format='json'
    )
    assert resp.status_code == 200
    webhook.refresh_from_db()
    with scopes_disabled():
        assert webhook.limit_events.count() == 1
        assert set(webhook.listeners.values_list('action_type', flat=True)) == {'pretix.event.order.placed',
                                                                                'pretix.event.order.canceled'}
    assert webhook.enabled