fix: complete PPI and KaKs reference handoff
This commit is contained in:
@@ -71,3 +71,45 @@ def test_reference_bundle_task_can_be_recovered_from_persisted_status(tmp_path,
|
||||
assert recovered is not None
|
||||
assert recovered["job_id"] == "job_ref_recover"
|
||||
assert recovered["status"] == "failed"
|
||||
|
||||
|
||||
def test_reference_bundle_task_uses_english_user_messages(tmp_path, monkeypatch):
|
||||
from apps.web import pipeline_backend
|
||||
from apps.web.vue3 import main
|
||||
|
||||
monkeypatch.setattr(main, "WORKSPACE_ROOT", tmp_path / "workspace")
|
||||
monkeypatch.setattr(main, "INPUT_ROOT", tmp_path / "input")
|
||||
job_id = "job_ref_english"
|
||||
task_id = "task_ref_english"
|
||||
(tmp_path / "workspace" / job_id).mkdir(parents=True)
|
||||
(tmp_path / "input" / job_id).mkdir(parents=True)
|
||||
main.tasks[task_id] = {
|
||||
"id": task_id,
|
||||
"task_id": task_id,
|
||||
"stage": "reference_bundle_download",
|
||||
"job_id": job_id,
|
||||
"status": "pending",
|
||||
}
|
||||
monkeypatch.setattr(
|
||||
pipeline_backend,
|
||||
"download_reference_annotation_bundle",
|
||||
lambda **_kwargs: {
|
||||
"status": "success",
|
||||
"requested_file_types": ["pep", "cds"],
|
||||
"files": {"pep": "ref.pep.fasta", "cds": "ref.cds.fasta"},
|
||||
},
|
||||
)
|
||||
|
||||
main.run_reference_bundle_download_task(
|
||||
task_id,
|
||||
{
|
||||
"job_id": job_id,
|
||||
"species_code": "string_taxon_3562",
|
||||
"requested_stages": ["ppi"],
|
||||
"timeout_sec": 30,
|
||||
},
|
||||
)
|
||||
|
||||
task = main.tasks.pop(task_id)
|
||||
assert task["message"] == "PPI and Ka/Ks reference species data are ready"
|
||||
assert task["progress"]["message"] == "PPI and Ka/Ks reference species data are ready"
|
||||
|
||||
Reference in New Issue
Block a user