Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/test_quantum_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def _stub_subprocess(returncode: int = 0, stdout: str = "ok", stderr: str = ""):
@pytest.mark.parametrize(
"jobs_payload,expected_preset",
[
([{"name": "another", "preset": "heart", "status": "completed"}], "heart"),
({"another": {"name": "another", "preset": "heart", "status": "completed"}}, "heart"),
([{"name": "smoke", "preset": "heart", "status": "completed"}], "heart"),
({"smoke": {"name": "smoke", "preset": "heart", "status": "completed"}}, "heart"),
],
)
def test_run_autorun_job_reads_status_for_list_and_dict_shapes(tmp_path: Path, monkeypatch, jobs_payload, expected_preset):
Expand All @@ -49,10 +49,10 @@ def test_run_autorun_job_reads_status_for_list_and_dict_shapes(tmp_path: Path, m
monkeypatch.setattr("mount.quantum_integration.subprocess.run",
lambda *args, **kwargs: _stub_subprocess())

result = asyncio.run(integration.run_autorun_job("another", dry_run=True))
result = asyncio.run(integration.run_autorun_job("smoke", dry_run=True))

assert result["success"] is True
assert result["job_name"] == "another"
assert result["job_name"] == "smoke"
assert result["dry_run"] is True
assert result["status"]["preset"] == expected_preset
assert result["status"]["name"] == "another"
assert result["status"]["name"] == "smoke"
Loading