test_events: Update code to test for only allowed system groups.

This commit updates do_set_realm_permission_group_setting_test
to test for only allowed system groups.
This commit is contained in:
Sahil Batra 2024-05-31 10:32:00 +05:30 committed by Tim Abbott
parent aac6d6cddb
commit c8b8b836fd
1 changed files with 24 additions and 0 deletions

View File

@ -3511,6 +3511,30 @@ class RealmPropertyActionTest(BaseAction):
if user_group.name == default_group_name:
continue
if (
not setting_permission_configuration.allow_internet_group
and user_group.name == SystemGroups.EVERYONE_ON_INTERNET
):
continue
if (
not setting_permission_configuration.allow_everyone_group
and user_group.name == SystemGroups.EVERYONE
):
continue
if (
not setting_permission_configuration.allow_owners_group
and user_group.name == SystemGroups.OWNERS
):
continue
if (
not setting_permission_configuration.allow_nobody_group
and user_group.name == SystemGroups.NOBODY
):
continue
now = timezone_now()
state_change_expected = True
num_events = 1