Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.indexer.storage.__init__::swh.indexer.storage.check_id_duplicates
Failed

TEST RESULT

Run At
Dec 7 2022, 2:12 PM
Details
110 111 If any two row models in `data` have the same unique key, raises 112 a `ValueError`. 113 114 Values associated to the key must be hashable. 115 116 Args: 117 data (List[dict]): List of dictionaries to be inserted 118 119 >>> check_id_duplicates([ UNEXPECTED EXCEPTION: ValueError('Cannot compute unique_key of ContentLicenseRow with no tool dictionary (indexer_configuration_id was given instead)') Traceback (most recent call last): File "/usr/lib/python3.7/doctest.py", line 1329, in __run compileflags, 1), test.globs) File "<doctest swh.indexer.storage.check_id_duplicates[0]>", line 3, in <module> File "/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/__init__.py", line 132, in check_id_duplicates counter = Counter(tuple(sorted(item.unique_key().items())) for item in data) File "/usr/lib/python3.7/collections/__init__.py", line 566, in __init__ self.update(*args, **kwds) File "/usr/lib/python3.7/collections/__init__.py", line 653, in update _count_elements(self, iterable) File "/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/__init__.py", line 132, in <genexpr> counter = Counter(tuple(sorted(item.unique_key().items())) for item in data) File "/var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/model.py", line 61, in unique_key f"Cannot compute unique_key of {self.__class__.__name__} with no tool " ValueError: Cannot compute unique_key of ContentLicenseRow with no tool dictionary (indexer_configuration_id was given instead) /var/lib/jenkins/workspace/DCIDX/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/indexer/storage/__init__.py:119: UnexpectedException