swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7ffaa66e4668>
deposit_client = <swh.loader.package.deposit.loader.ApiClient object at 0x7ffaa705aa58>
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7ffaa705a9e8>
def test_deposit_loading_ok(swh_storage, deposit_client, requests_mock_datadir):
url = "https://hal-test.archives-ouvertes.fr/some-external-id"
deposit_id = 666
loader = DepositLoader(
swh_storage, url, deposit_id, deposit_client, default_filename="archive.zip"
)
actual_load_status = loader.load()
expected_snapshot_id = "b2b327b33dc85818bd23c3ccda8b7e675a66ecbd"
> assert actual_load_status == {
"status": "eventful",
"snapshot_id": expected_snapshot_id,
}
E AssertionError: assert {'snapshot_id... 'uneventful'} == {'snapshot_id...': 'eventful'}
E Differing items:
E {'status': 'uneventful'} != {'status': 'eventful'}
E {'snapshot_id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e'} != {'snapshot_id': 'b2b327b33dc85818bd23c3ccda8b7e675a66ecbd'}
E Full diff:
E {
E - 'snapshot_id': 'b2b327b33dc85818bd23c3ccda8b7e675a66ecbd',
E + 'snapshot_id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e',...
E
E ...Full output truncated (5 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/loader/package/deposit/tests/test_deposit.py:173: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 12 2021, 12:13 PM