Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_identifiers.py
Show First 20 Lines • Show All 1,337 Lines • ▼ Show 20 Lines | assert ( | ||||
ExtID.from_dict({**extid_dict, "extid_version": 0}).id | ExtID.from_dict({**extid_dict, "extid_version": 0}).id | ||||
== ExtID.from_dict(extid_dict).id | == ExtID.from_dict(extid_dict).id | ||||
) | ) | ||||
assert ( | assert ( | ||||
ExtID.from_dict({**extid_dict, "extid_version": 1}).id | ExtID.from_dict({**extid_dict, "extid_version": 1}).id | ||||
!= ExtID.from_dict(extid_dict).id | != ExtID.from_dict(extid_dict).id | ||||
) | ) | ||||
assert ( | |||||
ExtID.from_dict( | |||||
{ | |||||
**extid_dict, | |||||
"payload_type": "test", | |||||
"payload": bytes.fromhex("257cc5642cb1a054f08cc83f2d943e56fd3ebe99"), | |||||
} | |||||
).id | |||||
!= ExtID.from_dict(extid_dict).id | |||||
) |