def test__api_delete(
    mock_stripe_class, stripe_account, api_key, expected_api_key, extra_kwargs
):
    """Test that API delete properly uses the passed in parameters."""
    test_model = ExampleStripeModel()
    mock_id = "id_fakefakefakefake01"
    test_model.id = mock_id

    # invoke _api_delete()
    test_model._api_delete(
        api_key=api_key, stripe_account=stripe_account, **extra_kwargs
    )

    mock_stripe_class.delete.assert_called_once_with(
        mock_id,
        api_key=expected_api_key,
        stripe_account=stripe_account,
        stripe_version=djstripe_settings.STRIPE_API_VERSION,
        **extra_kwargs,
    )
Test that API delete properly uses the passed in parameters.
tests/test_stripe_model.py