From 6576954c8937e3b6d26bfc46ff1fd4ca7f92e43a Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 8 Dec 2023 12:04:12 +0100 Subject: [PATCH] tests: fix test test_a2_hook_manager_modify_table (#84483) Table of users got a new column in #83261. --- tests/test_hooks.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/test_hooks.py b/tests/test_hooks.py index 2ef7a2e..6faf08b 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -26,9 +26,24 @@ def test_a2_hook_manager_modify_table(db, rf, admin, monkeypatch, app): # base table contains a2 generic column assert 'get_full_name' in list(user_table.sequence) - assert len(list(user_table.sequence)) == 6 + assert set(user_table.sequence) >= { + 'get_full_name', + 'username', + 'email', + 'first_name', + 'last_name', + 'ou', + } + assert 'get_full_name' in user_table.base_columns - assert len(list(user_table.base_columns)) == 6 + assert set(user_table.base_columns) >= { + 'get_full_name', + 'username', + 'email', + 'first_name', + 'last_name', + 'ou', + } # does not crash when explicitely run app_config.a2_hook_manager_modify_table(users_view, user_table)