ci: real sites, the diagnosis names the document's status once (http_status)

This commit is contained in:
feder-cr committed 2026-11-17 08:32:49 +01:00
1 parent 27b884ae87
commit 7ab22b0961
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -128,7 +128,7 @@ def visit(page, state, site, canary_url, timeouts, errors, diagnose=False):
def diagnosis(page, code) -> dict:
"""What the document is, for fixing a marker: its HTTP status, its title and the first 40 ids of its elements. Read, never judged."""
out = {"http": code, "http_status": code, "title": None, "ids": []}
out = {"http_status": code, "title": None, "ids": []}
try:
out["title"] = page.title()
except Exception:
@@ -173,7 +173,7 @@ def test_the_diagnosis_has_the_status_of_the_document_and_at_most_forty_non_empt
_package, data = _run(tmp_path, monkeypatch, mode, ["--diagnose"])
diagnosis = data["cells"]["nomarker"]["diagnosis"]
assert data["cells"]["nomarker"]["marker"] is False and data["cells"]["nomarker"]["status"] == "4xx"
assert diagnosis["http"] == 403 and diagnosis["http_status"] == 403 and diagnosis["title"] == "a title"
assert "http" not in diagnosis and diagnosis["http_status"] == 403 and diagnosis["title"] == "a title"
assert len(diagnosis["ids"]) == 40 and all(diagnosis["ids"]) and diagnosis["ids"][:3] == ["a", "b", "id0"]
assert "diagnosis" not in data["cells"]["fine"], "only a cell without its marker is diagnosed"
_package, plain = _run(tmp_path, monkeypatch, mode)