alice-biometrics/petisco

Update __eq__ and __ne__ operators in ValueObjects

Closed this issue · 1 comments

Now comparison on ValueObjects as Uuid not works

    value = "a8884fa9-3477-4533-9cd5-d99096435b31"
    id_ = Uuid(value)
    expected_id = Uuid(value)

    assert id_ == value # It fails
    assert id_ == expected_id #It works

Should it work as following?:

    value = "a8884fa9-3477-4533-9cd5-d99096435b31"
    id_ = Uuid(value)
    expected_id = Uuid(value)

    assert id_ == value
    assert id_ == expected_id

I think this could cause confusion.