self = <swh.indexer.tests.test_metadata.TestMetadata object at 0x7fa401564400>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fa400043240>
def test_extrinsic_metadata_indexer_unknown_format(self, mocker):
"""Should be ignored when unknown format"""
metadata_indexer = ExtrinsicMetadataIndexer(config=DIRECTORY_METADATA_CONFIG)
metadata_indexer.storage = mocker.patch.object(metadata_indexer, "storage")
remd = attr.evolve(REMD, format="unknown format")
> results = metadata_indexer.index(remd.id, data=remd)
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:191:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata.py:120: in index
if data.format in mapping.extrinsic_metadata_formats():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'swh.indexer.metadata_dictionary.composer.ComposerMapping'>
@classmethod
def extrinsic_metadata_formats(cls) -> Tuple[str, ...]:
"""
Returns the list of extrinsic metadata formats which can be translated
by this mapping
"""
> raise NotImplementedError(f"{cls.__name__}.extrinsic_metadata_formats")
E NotImplementedError: ComposerMapping.extrinsic_metadata_formats
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/base.py:77: NotImplementedError
TEST RESULT
TEST RESULT
- Run At
- Jul 4 2022, 2:14 PM