Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/views/test_vault.py
Show All 30 Lines | for obj_type, obj_id in ( | ||||
("revision_gitfast", revision), | ("revision_gitfast", revision), | ||||
): | ): | ||||
fetch_url = reverse( | fetch_url = reverse( | ||||
f"api-1-vault-fetch-{obj_type}", url_args={f"{obj_type[:3]}_id": obj_id}, | f"api-1-vault-fetch-{obj_type}", url_args={f"{obj_type[:3]}_id": obj_id}, | ||||
) | ) | ||||
stub_cook = { | stub_cook = { | ||||
"fetch_url": fetch_url, | "fetch_url": fetch_url, | ||||
"obj_id": obj_id, | "object_id": obj_id, | ||||
"obj_type": obj_type, | "type": obj_type, | ||||
"progress_message": None, | "progress_message": None, | ||||
"status": "done", | "task_status": "done", | ||||
"task_uuid": "de75c902-5ee5-4739-996e-448376a93eff", | "task_uuid": "de75c902-5ee5-4739-996e-448376a93eff", | ||||
} | } | ||||
stub_fetch = b"content" | stub_fetch = b"content" | ||||
mock_archive.vault_cook.return_value = stub_cook | mock_archive.vault_cook.return_value = stub_cook | ||||
mock_archive.vault_fetch.return_value = stub_fetch | mock_archive.vault_fetch.return_value = stub_fetch | ||||
email = "test@test.mail" | email = "test@test.mail" | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |