def dict_is_test(data):
    """helper function to check whether passed argument is a proper :class:`dict` object describing a test.

    :param dict data: value to check
    :rtype: bool
    """
    return (
        isinstance(data, dict)
        and "type" in data
        and data["type"] == "test"
        and "id" in data
        and "attributes" in data
        and isinstance(data["attributes"], dict)
    )
    # optionally, it can have "links" dict