tests: fix test test_a2_hook_manager_modify_table (#84483)
gitea/authentic2-cut/pipeline/head This commit looks good Details

Table of users got a new column in #83261.
This commit is contained in:
Benjamin Dauvergne 2023-12-08 12:04:12 +01:00
parent b34603cbcf
commit 6576954c89
1 changed files with 17 additions and 2 deletions

View File

@ -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)