Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.indexer.tests.test_metadata.TestMetadata::test_extrinsic_metadata_indexer_thirdparty_authority
Failed

TEST RESULT

Run At
Sep 15 2022, 8:49 AM
Details
self = <swh.indexer.tests.test_metadata.TestMetadata object at 0x7ff582d7d940> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff5539079e8> def test_extrinsic_metadata_indexer_thirdparty_authority(self, mocker): """Should be ignored when authority URL does not match the origin""" origin = "https://different-domain.example.org/jdoe/myrepo" metadata_indexer = ExtrinsicMetadataIndexer(config=DIRECTORY_METADATA_CONFIG) metadata_indexer.catch_exceptions = False metadata_indexer.storage = mocker.patch.object(metadata_indexer, "storage") metadata_indexer.storage.origin_get_by_sha1.return_value = [{"url": origin}] tool = metadata_indexer.idx_storage.indexer_configuration_get( {f"tool_{k}": v for (k, v) in TRANSLATOR_TOOL.items()} ) assert tool is not None > results = metadata_indexer.index(REMD.id, data=REMD) .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:278: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/indexer/metadata.py:127: in index metadata_item = mapping.translate(data.metadata) .tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/base.py:359: in translate return self._translate_dict(content_dict) .tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/base.py:221: in _translate_dict root = self.get_root_uri(content_dict) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.indexer.metadata_dictionary.github.GitHubMapping object at 0x7ff553907c18> content_dict = {'full_name': 'test software'} def get_root_uri(self, content_dict: dict) -> URIRef: if isinstance(content_dict.get("html_url"), str): return URIRef(content_dict["html_url"]) else: > raise ValueError(f"Unexpected html_url in GitHub metadata: {content_dict}") E ValueError: Unexpected html_url in GitHub metadata: {'full_name': 'test software'} .tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/github.py:53: ValueError