Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Jul 21 2022, 7:31 PM
Details
self = <swh.indexer.tests.test_metadata.TestMetadata object at 0x7fd9339e7f98> def test_directory_metadata_indexer(self): metadata_indexer = DirectoryMetadataIndexer(config=DIRECTORY_METADATA_CONFIG) fill_obj_storage(metadata_indexer.objstorage) fill_storage(metadata_indexer.storage) tool = metadata_indexer.idx_storage.indexer_configuration_get( {f"tool_{k}": v for (k, v) in TRANSLATOR_TOOL.items()} ) assert tool is not None dir_ = DIRECTORY2 metadata_indexer.idx_storage.content_metadata_add( [ ContentMetadataRow( id=dir_.entries[0].target, indexer_configuration_id=tool["id"], metadata=YARN_PARSER_METADATA, ) ] ) metadata_indexer.run([dir_.id]) results = list( metadata_indexer.idx_storage.directory_intrinsic_metadata_get([dir_.id]) ) expected_results = [ DirectoryIntrinsicMetadataRow( id=dir_.id, tool=TRANSLATOR_TOOL, metadata=YARN_PARSER_METADATA, mappings=["npm"], ) ] for result in results: del result.tool["id"] > assert results == expected_results E AssertionError: assert [DirectoryInt...ings=['npm'])] == [DirectoryInt...ings=['npm'])] E At index 0 diff: DirectoryIntrinsicMetadataRow(indexer_configuration_id=None, tool={'name': 'swh-metadata-translator', 'version': '0.0.2', 'configuration': {'type': 'local', 'context': 'NpmMapping'}}, id=b'M\x17\xcc\xe1\xe2\r\x1b\x1c\xd8\xc7\\\xd1\xbb;;\xa4\x94\xa9\xc3\xc0', metadata={'@context': 'https://doi.org/10.5063/schema/codemeta-2.0'}, mappings=['npm']) != DirectoryIntrinsicMetadataRow(indexer_configuration_id=None, tool={'name': 'swh-metadata-translator', 'version': '0.0.2', 'configuration': {'type': 'local', 'context': 'NpmMapping'}}, id=b'M\x17\xcc\xe1\xe2\r\... E E ...Full output truncated (4 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:123: AssertionError