Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_model.py
Show First 20 Lines • Show All 1,113 Lines • ▼ Show 20 Lines | def test_metadata_validate_context_directory(): | ||||
): | ): | ||||
RawExtrinsicMetadata( | RawExtrinsicMetadata( | ||||
target=_content_swhid, | target=_content_swhid, | ||||
directory=CoreSWHID( | directory=CoreSWHID( | ||||
object_type=ObjectType.CONTENT, object_id=EXAMPLE_HASH, | object_type=ObjectType.CONTENT, object_id=EXAMPLE_HASH, | ||||
), | ), | ||||
**_common_metadata_fields, | **_common_metadata_fields, | ||||
) | ) | ||||
@given(strategies.extids()) | |||||
def test_extid(extid): | |||||
assert extid | |||||
assert extid.unique_key() | |||||
assert extid.target.object_type.value in ( | |||||
"cnt", | |||||
"dir", | |||||
"rev", | |||||
"rel", | |||||
"snp", | |||||
"ori", | |||||
"emd", | |||||
) |