def test__find_owner_account_for_empty_data(
    mock_get_or_retrieve_for_api_key,
    api_key,
):
    """
    Test that the correct classmethod is invoked with the correct arguments
    to get the owner account
    """

    fake_data = {}

    if api_key is None:
        # invoke _find_owner_account without the api_key parameter
        StripeModel._find_owner_account(fake_data)
    else:
        # invoke _find_owner_account with the api_key parameter
        StripeModel._find_owner_account(fake_data, api_key=api_key)

    if api_key:
        mock_get_or_retrieve_for_api_key.assert_called_once_with(api_key)
    else:
        mock_get_or_retrieve_for_api_key.assert_called_once_with(
            djstripe_settings.STRIPE_SECRET_KEY
        )

    Test that the correct classmethod is invoked with the correct arguments
    to get the owner account
    
tests/test_stripe_model.py