self = <swh.indexer.tests.test_metadata.Metadata testMethod=test_detect_metadata_package_json>
def test_detect_metadata_package_json(self):
# given
df = [
{
"sha1_git": b"abc",
"name": b"index.js",
"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"package.json",
"target": b"aab",
"length": 712,
"status": "visible",
"type": "file",
"perms": 33188,
"dir_id": b"dir_a",
"sha1": b"cde",
},
]
# when
results = detect_metadata(df)
expected_results = {"NpmMapping": [b"cde"]}
# then
> self.assertEqual(expected_results, results)
E AssertionError: {'NpmMapping': [b'cde']} != {}
E - {'NpmMapping': [b'cde']}
E + {}
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:439: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Apr 18 2022, 8:43 PM