groups: Move constants inside NamedUserGroup.

This commit is contained in:
Sahil Batra
2024-04-18 14:20:51 +05:30
committed by Tim Abbott
parent 85b7dbddbc
commit 8e9c22afdc
7 changed files with 57 additions and 58 deletions

View File

@@ -75,6 +75,7 @@ from zerver.lib.types import LinkifierDict, RealmPlaygroundDict
from zerver.lib.utils import assert_is_not_none
from zerver.models import (
Message,
NamedUserGroup,
Realm,
RealmAuditLog,
RealmPlayground,
@@ -1085,10 +1086,10 @@ class TestRealmAuditLog(ZulipTestCase):
realm = do_create_realm(string_id="test", name="foo")
# The expected number of system user group is the total number of roles
# from UserGroup.SYSTEM_USER_GROUP_ROLE_MAP in addition to
# from NamedUserGroup.SYSTEM_USER_GROUP_ROLE_MAP in addition to
# full_members_system_group, everyone_on_internet_system_group and
# nobody_system_group.
expected_system_user_group_count = len(UserGroup.SYSTEM_USER_GROUP_ROLE_MAP) + 3
expected_system_user_group_count = len(NamedUserGroup.SYSTEM_USER_GROUP_ROLE_MAP) + 3
system_user_group_ids = sorted(
UserGroup.objects.filter(