def oneof(*args, **kwargs):
    """Test if just one of the values is True.

    @rtype: bool
    """
    found = False
    for i in (list(args) + list(kwargs.values())):
        if i:
            if found:
                return False
            found = True
    return found
