Weise bei einem Paperless-Fehler auf die Kombination aus allen Tags und Zusatzfeld hin, die Paperless selbst mit HTTP 500 beantwortet.
Deploy Development / deploy (push) Successful in 49s
Test Suite / pytest-backend (push) Failing after 6m4s
Test Suite / smoke-dev (push) Successful in 1s
Test Suite / frontend-build (push) Successful in 24s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-10-25 06:58:07 +01:00
1 parent 0f2b7a8fab
commit ffdaf1c721
2 files changed
+14 -3

No files matched your search

+7
View File
@@ -677,6 +677,13 @@ def test_paperless_refusal_names_the_status_and_reason(monkeypatch):
with pytest.raises(Problem) as caught:
sources._paperless_get("https://paper.example.test", "token-alpha", "/api/documents/", {})
assert caught.value.detail.endswith("(HTTP 500 auf /api/documents/).")
with pytest.raises(Problem) as caught:
sources._paperless_get("https://paper.example.test", "token-alpha", "/api/documents/", {}, "Hinweis.")
assert caught.value.detail.endswith("(HTTP 500 auf /api/documents/). Hinweis.")
monkeypatch.setattr(sources, "urlopen", refuse(400, b"{}"))
with pytest.raises(Problem) as caught:
sources._paperless_get("https://paper.example.test", "token-alpha", "/api/documents/", {}, "Hinweis.")
assert "Hinweis" not in caught.value.detail
monkeypatch.setattr(sources, "urlopen", refuse(403, b"{}"))
with pytest.raises(Problem) as caught:
sources._paperless_get("https://paper.example.test", "token-alpha", "/api/documents/", {})