098 Values associated to the key must be hashable.
099
100 Args:
101 data (List[dict]): List of dictionaries to be inserted
102
103 >>> check_id_duplicates([
104 ... ContentLicenseRow(id=b'foo', indexer_configuration_id=42, license="GPL"),
105 ... ContentLicenseRow(id=b'foo', indexer_configuration_id=32, license="GPL"),
106 ... ])
107 >>> check_id_duplicates([
Differences (unified diff with -expected +actual):
@@ -1,3 +1,8 @@
Traceback (most recent call last):
- ...
-swh.indexer.storage.exc.DuplicateId: [{'id': b'foo', 'indexer_configuration_id': 42}]
+ File "/usr/lib/python3.7/doctest.py", line 1329, in __run
+ compileflags, 1), test.globs)
+ File "<doctest swh.indexer.storage.check_id_duplicates[1]>", line 3, in <module>
+ ContentLicenseRow(id=b'foo', indexer_configuration_id=42, license="AGPL"),
+ File "/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/__init__.py", line 118, in check_id_duplicates
+ raise DuplicateId(list(map(dict, duplicates)))
+swh.indexer.storage.exc.DuplicateId: [{'id': b'foo', 'indexer_configuration_id': 42, 'license': 'AGPL'}]
/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/__init__.py:107: DocTestFailure
TEST RESULT
TEST RESULT
- Run At
- Jul 22 2022, 4:51 PM