Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/deposit/tests/test_deposit.py
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | ): | ||||
] | ] | ||||
assert len(urls) == 1 | assert len(urls) == 1 | ||||
update_query = urls[0] | update_query = urls[0] | ||||
body = update_query.json() | body = update_query.json() | ||||
expected_body = { | expected_body = { | ||||
"status": "failed", | "status": "failed", | ||||
"status_detail": { | |||||
"loading": [ | |||||
"Failed to load branch HEAD for some-url-2: Fail to query " | |||||
"'https://deposit.softwareheritage.org/1/private/666/raw/'. Reason: 404" | |||||
] | |||||
}, | |||||
} | } | ||||
assert body == expected_body | assert body == expected_body | ||||
def test_deposit_loading_ok(swh_storage, deposit_client, requests_mock_datadir): | def test_deposit_loading_ok(swh_storage, deposit_client, requests_mock_datadir): | ||||
url = "https://hal-test.archives-ouvertes.fr/some-external-id" | url = "https://hal-test.archives-ouvertes.fr/some-external-id" | ||||
deposit_id = 666 | deposit_id = 666 | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |