def test_payment_intent_succeeded_with_destination_charge(
        self,
        payment_method_retrieve_mock,
        payment_intent_retrieve_mock,
        file_upload_retrieve_mock,
        account_retrieve_mock,
        customer_retrieve_mock,
    ):
        """Test that the payment intent succeeded event can create all related objects.

        This should exercise the machinery to set `stripe_account` when recursing into
        objects related to a connect `Account`.
        """
        event = self._create_event(
            FAKE_EVENT_PAYMENT_INTENT_SUCCEEDED_DESTINATION_CHARGE
        )
        event.invoke_webhook_handlers()

        # Make sure the file uploads were retrieved using the account ID.
        file_upload_retrieve_mock.assert_has_calls(
            (
                call(
                    id=FAKE_FILEUPLOAD_ICON["id"],
                    api_key=ANY,
                    expand=ANY,
                    stripe_account=FAKE_ACCOUNT["id"],
                    stripe_version=djstripe_settings.STRIPE_API_VERSION,
                ),
                call(
                    id=FAKE_FILEUPLOAD_LOGO["id"],
                    api_key=ANY,
                    expand=ANY,
                    stripe_account=FAKE_ACCOUNT["id"],
                    stripe_version=djstripe_settings.STRIPE_API_VERSION,
                ),
            )
        )
Test that the payment intent succeeded event can create all related objects.

        This should exercise the machinery to set `stripe_account` when recursing into
        objects related to a connect `Account`.
        
tests/test_event_handlers.py