test(vector): address PR #873 round-3 nits
- Simplify the OCS status guard to `if status and status != "ok"` — falsy (missing/None/"") is tolerated more naturally than the explicit tuple. - Add `test_value_error_from_ocs_failure_returns_none`, covering the OCS-failure ValueError flowing through `_get_enabled_apps_or_none` to the scan-all fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
84dfe8a8fc
commit
2e25c2723e
@@ -225,7 +225,7 @@ class NextcloudClient:
|
||||
# cycle on an empty ``data``. Tolerate a missing/empty meta (our own
|
||||
# mocks, and any envelope that omits it).
|
||||
status = (ocs.get("meta") or {}).get("status")
|
||||
if status not in ("ok", None, ""):
|
||||
if status and status != "ok": # falsy (missing/None/"") tolerated
|
||||
raise ValueError(f"OCS navigation returned status={status!r}")
|
||||
entries = ocs.get("data") or []
|
||||
enabled: set[str] = set()
|
||||
|
||||
Reference in New Issue
Block a user