Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123982
D5127.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
904 B
Subscribers
None
D5127.diff
View Options
diff --git a/swh/model/tests/test_identifiers.py b/swh/model/tests/test_identifiers.py
--- a/swh/model/tests/test_identifiers.py
+++ b/swh/model/tests/test_identifiers.py
@@ -9,6 +9,7 @@
from typing import Dict
import unittest
+import attr
import pytest
from swh.model import hashutil, identifiers
@@ -21,6 +22,7 @@
REVISION,
SNAPSHOT,
SWHID,
+ SWHID_QUALIFIERS,
CoreSWHID,
ExtendedObjectType,
ExtendedSWHID,
@@ -1534,6 +1536,19 @@
assert str(parsed) == string
+def test_QualifiedSWHID_attributes():
+ """Checks the set of QualifiedSWHID attributes match the SWHID_QUALIFIERS
+ constant."""
+
+ assert set(attr.fields_dict(QualifiedSWHID)) == {
+ "namespace",
+ "scheme_version",
+ "object_type",
+ "object_id",
+ *SWHID_QUALIFIERS,
+ }
+
+
@pytest.mark.parametrize(
"ns,version,type,id",
[
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 20 2024, 7:47 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3226771
Attached To
D5127: Fix qualifier parsing and add tests
Event Timeline
Log In to Comment