Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop event fields against events from query validation. (#12047)
Piotr Zabieglik7a1a4bdec362
diff --git a/saleor/app/manifest_validations.py b/saleor/app/manifest_validations.pyindex f8d33db9d4..a6ab9b785d 100644--- a/saleor/app/manifest_validations.py+++ b/saleor/app/manifest_validations.py@@ -234,14 +234,6 @@ def clean_webhooks(manifest_data, errors):if not webhook["events"]:webhook["events"] = subscription_query.events- elif sorted(webhook["events"]) != sorted(subscription_query.events):- errors["webhooks"].append(- ValidationError(- "Events provided in `syncEvents` and `asyncEvents` does not "- "match events from `query`",- code=AppErrorCode.INVALID.value,- )- )try:target_url_validator(webhook["targetUrl"])diff --git a/saleor/app/tests/test_installation_utils.py b/saleor/app/tests/test_installation_utils.pyindex 439e0091a7..8a632fff93 100644--- a/saleor/app/tests/test_installation_utils.py+++ b/saleor/app/tests/test_installation_utils.py@@ -436,36 +436,6 @@ def test_install_app_webhook_incorrect_custom_headers()-def test_install_app_with_webhook_mismatch_between_query_and_event_fields(- app_manifest,- app_manifest_webhook,- app_installation,- monkeypatch,- subscription_order_created_webhook,-):- # given- app_manifest_webhook[- "query"- ] = subscription_order_created_webhook.subscription_query- app_manifest["webhooks"] = [app_manifest_webhook]-- mocked_get_response = Mock()- mocked_get_response.json.return_value = app_manifest- monkeypatch.setattr(requests, "get", Mock(return_value=mocked_get_response))-- # when & then- with pytest.raises(ValidationError) as excinfo:- install_app(app_installation, activate=True)-- error_dict = excinfo.value.error_dict- assert "webhooks" in error_dict- assert (- error_dict["webhooks"][0].message- == "Events provided in `syncEvents` and `asyncEvents` "- "does not match events from `query`"- )--def test_install_app_lack_of_token_target_url_in_manifest_data(app_manifest, app_installation, monkeypatch, permission_manage_products):