""" This module holds the utils of the ``likes`` app. """

from mtp.apps.likes.models import Likeable


def check_likeability(obj):
    """ Check the provided object is a likeable object.

    Parameters
    ----------
    obj : object
        The object which will be tested.

    Raises
    ------
    ValueError
        If `obj` is not a likeable object.
    """
    if not isinstance(obj, Likeable):
        raise ValueError("%s is not likeable object." % obj)
