From c30550d6330b92235058078905742ccf9d03bf0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Wed, 22 Jul 2026 10:53:10 +0200 Subject: [PATCH] fix: [tests] Drop assertions on removed is_admin/is_commenter user flags The vulnerability-lookup RBAC migration removed the is_admin, is_commenter, and is_reporter boolean flags from the user model and the API responses. Three test_web.py assertions still read those keys and failed against an instance running the new model: - test_list_users read user['is_admin'] (the user-list endpoint now exposes only 'login'); - test_create_user_comment read user['is_commenter'] from the create- user response, which no longer carries the flags. The tests keep their meaning: the admin user is still located by login, and a user and comment are still created (uid remains used for cleanup). Co-Authored-By: Claude Fable 5 --- tests/test_web.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_web.py b/tests/test_web.py index 41aa3f1..e01549c 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -316,7 +316,6 @@ def test_list_users(self) -> None: for user in self.client.get_users_iter(): self.assertTrue('login' in user, user) if user['login'] == 'admin': - self.assertTrue(user['is_admin']) got_admin = True self.assertTrue(got_admin) @@ -339,8 +338,6 @@ def test_create_user_comment(self) -> None: uid = user['id'] self.assertTrue('login' in user, user) # self.assertTrue('apikey' in user, user) - self.assertTrue('is_commenter' in user, user) - self.assertTrue(user['is_commenter']) # self.client.set_apikey(user['apikey']) comment = {'title': 'test', 'description': 'test', 'vulnerability': 'CVE-2024-20401',