From e3b3a46eece9487cf1e0c0f8b130afc2e190ce7e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 00:00:00 +0000 Subject: test(case-attr): remove stale BUG docstring from edit test The __population_privileges__ bug described in the docstring and assertion message of test_resource_owner_can_edit_returns_201 is fixed. Remove the stale description and simplify the assertion message. Also updates the Level 4 section comment (dropped the bug parenthetical). Reviewed-By: Frederick M. Muriithi --- tests/test_gn3_case_attr_access.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/test_gn3_case_attr_access.py b/tests/test_gn3_case_attr_access.py index 638f1ab..5a3380f 100644 --- a/tests/test_gn3_case_attr_access.py +++ b/tests/test_gn3_case_attr_access.py @@ -284,7 +284,6 @@ def resource_owner_token( # --------------------------------------------------------------------------- # Level 4: edit with resource-owner privilege -# (documents the __population_privileges__ bug) # --------------------------------------------------------------------------- @pytest.mark.case_attr_access @@ -295,13 +294,7 @@ def resource_owner_token( ]) def test_resource_owner_can_edit_returns_201( gn3_url, http, resource_owner_token, path): - """A resource-owner on the BXD population must be allowed to queue edits (201). - - BUG: Currently returns 401 because __population_privileges__ calls - GET /auth/resource//roles without a Bearer token, so resource_privs is - always empty and the resource_spec branch of can_edit is never reachable. - This test is RED until that bug is fixed. - """ + """A resource-owner on the BXD population must be allowed to queue edits (201).""" resp = http.post( f"{gn3_url}{path}", json={"edit-data": []}, @@ -310,9 +303,7 @@ def test_resource_owner_can_edit_returns_201( ) assert resp.status_code == 201, ( f"Expected 201 for resource-owner POST {path!r}, " - f"got {resp.status_code}. " - f"If 401: likely the __population_privileges__ bug (resource_privs always empty). " - f"Body: {resp.text[:300]}" + f"got {resp.status_code}. Body: {resp.text[:300]}" ) -- cgit 1.4.1