swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7ffaa65a7208>
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7ffaa65be9b0>
def test_npm_artifact_with_no_intrinsic_metadata(swh_storage, requests_mock_datadir):
"""Skip artifact with no intrinsic metadata during ingestion
"""
package = "nativescript-telerik-analytics"
url = package_url(package)
loader = NpmLoader(swh_storage, url)
actual_load_status = loader.load()
# no branch as one artifact without any intrinsic metadata
expected_snapshot = Snapshot(
id=hash_to_bytes("1a8893e6a86f444e8be8e7bda6cb34fb1735a00e"), branches={},
)
> assert actual_load_status == {
"status": "eventful",
"snapshot_id": expected_snapshot.id.hex(),
}
E AssertionError: assert {'snapshot_id... 'uneventful'} == {'snapshot_id...': 'eventful'}
E Omitting 1 identical items, use -vv to show
E Differing items:
E {'status': 'uneventful'} != {'status': 'eventful'}
E Full diff:
E {
E 'snapshot_id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e',
E - 'status': 'eventful',...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/loader/package/npm/tests/test_npm.py:528: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 12 2021, 12:13 PM