Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/npm/tests/test_npm.py
| Show First 20 Lines • Show All 539 Lines • ▼ Show 20 Lines | def test_npm_artifact_with_no_upload_time(swh_config, requests_mock_datadir): | ||||
| """With no time upload, artifact is skipped | """With no time upload, artifact is skipped | ||||
| """ | """ | ||||
| package = 'jammit-no-time' | package = 'jammit-no-time' | ||||
| url = package_url(package) | url = package_url(package) | ||||
| loader = NpmLoader(url) | loader = NpmLoader(url) | ||||
| actual_load_status = loader.load() | actual_load_status = loader.load() | ||||
| assert actual_load_status['status'] == 'failed' | assert actual_load_status['status'] == 'uneventful' | ||||
| # no branch as one artifact without any intrinsic metadata | # no branch as one artifact without any intrinsic metadata | ||||
| expected_snapshot = { | expected_snapshot = { | ||||
| 'id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e', | 'id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e', | ||||
| 'branches': {}, | 'branches': {}, | ||||
| } | } | ||||
| check_snapshot(expected_snapshot, loader.storage) | check_snapshot(expected_snapshot, loader.storage) | ||||
| Show All 35 Lines | |||||