def test_detect_metadata_codemeta_json_uppercase():
df = [
{
"sha1_git": b"abc",
"name": b"index.html",
"target": b"abc",
"length": 897,
"status": "visible",
"type": "file",
"perms": 33188,
"dir_id": b"dir_a",
"sha1": b"bcd",
},
{
"sha1_git": b"aab",
"name": b"CODEMETA.json",
"target": b"aab",
"length": 712,
"status": "visible",
"type": "file",
"perms": 33188,
"dir_id": b"dir_a",
"sha1": b"bcd",
},
]
> results = detect_metadata(df)
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/metadata_dictionary/test_codemeta.py:172:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_detector.py:25: in detect_metadata
matches = mapping.detect_metadata_files(files)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'swh.indexer.metadata_dictionary.composer.ComposerMapping'>
file_entries = [{'dir_id': b'dir_a', 'length': 897, 'name': b'index.html', 'perms': 33188, ...}, {'dir_id': b'dir_a', 'length': 712, 'name': b'CODEMETA.json', 'perms': 33188, ...}]
@classmethod
def detect_metadata_files(cls, file_entries: List[DirectoryLsEntry]) -> List[Sha1]:
"""
Returns the sha1 hashes of files which can be translated by this mapping
"""
> raise NotImplementedError(f"{cls.__name__}.detect_metadata_files")
E NotImplementedError: ComposerMapping.detect_metadata_files
.tox/py3/lib/python3.7/site-packages/swh/indexer/metadata_dictionary/base.py:69: NotImplementedError
TEST RESULT
TEST RESULT
- Run At
- Jul 4 2022, 2:14 PM