def _compare_item(obj, spec):
    for (key, value) in spec.items():
        if isinstance(value, tuple):
            try:
                self.assert_unordered_result(getattr(obj, key), value[0], *value[1])
            except AssertionError:
                return False
        elif (getattr(obj, key, NOVALUE) != value):
            return False
    return True
def _compare_item(obj, spec):
    for (key, value) in spec.items():
        if isinstance(value, tuple):
            try:
                self.assert_unordered_result(getattr(obj, key), value[0], *value[1])
            except AssertionError:
                return False
        elif (getattr(obj, key, NOVALUE) != value):
            return False
    return True