"""A row that is gone answers with a reason the bilingual UI can translate (deep-review round 3). The 404 a user actually meets is the one for something deleted in another tab or on another device. `owned_or_404` / `get_or_404` sent it as a bare English string ("Unknown view", "Not found"), and the Hungarian UI toasted it verbatim. The structured-404 fix had gone into one ad-hoc helper instead of the shared one, so every other owner check kept the English. Needs the DB. """ def test_a_gone_view_tag_or_pin_says_what_is_gone(db, make_user, as_user): client = as_user(make_user()) for method, url, what in [ ("patch", "/api/saved-views/999999", "view"), ("delete", "/api/saved-views/999999", "view"), ("delete", "/api/tags/999999", "tag"), ("delete", "/api/discover/pins/999999", "pin"), ]: r = getattr(client, method)(url, **({"json": {"name": "x"}} if method == "patch" else {})) assert r.status_code == 404, (url, r.text) assert r.json()["detail"] == {"code": "not_found", "reason": what}, url