def custom_account_func_fixture(django_db_setup, django_db_blocker, configure_settings):
    """
    Same as custom_account_fixture but functional.

    This is useful for tests involving rejecting and deleting instances.
    """
    # See: https://pytest-django.readthedocs.io/en/latest/database.html#populate-the-test-database-if-you-don-t-use-transactional-or-live-server
    with django_db_blocker.unblock():
        # setup_stuff
        account_json = models.Account._api_create(
            type="custom",
            country="US",
            email="jenny.custom.rosen@example.com",
            capabilities={
                "card_payments": {"requested": True},
                "transfers": {"requested": True},
            },
            api_key=settings.STRIPE_SECRET_KEY,
        )
        account_instance = models.Account.sync_from_stripe_data(
            account_json,
            api_key=settings.STRIPE_SECRET_KEY,
        )

        yield account_json, account_instance

        # teardown_stuff
        try:
            # try to delete
            account_instance._api_delete(api_key=settings.STRIPE_SECRET_KEY)
        except (InvalidRequestError, PermissionError):
            pass

    Same as custom_account_fixture but functional.

    This is useful for tests involving rejecting and deleting instances.
    
tests/conftest.py