test_user_groups: Fix comments in group creation tests.

One comment did not mention the correct thing that was
being tested and one comment had a typo.
This commit is contained in:
Sahil Batra 2024-10-18 15:21:19 +05:30 committed by Tim Abbott
parent ac2b1cd45d
commit 0a77f06163
1 changed files with 2 additions and 2 deletions

View File

@ -481,7 +481,7 @@ class UserGroupAPITestCase(UserGroupTestCase):
self.assert_json_error(result, "User group 'support' already exists.") self.assert_json_error(result, "User group 'support' already exists.")
self.assert_length(NamedUserGroup.objects.filter(realm=hamlet.realm), 10) self.assert_length(NamedUserGroup.objects.filter(realm=hamlet.realm), 10)
# Test we cannot create group with same name again # Test we cannot create group with name longer than allowed length.
params = { params = {
"name": "a" * (NamedUserGroup.MAX_NAME_LENGTH + 1), "name": "a" * (NamedUserGroup.MAX_NAME_LENGTH + 1),
"members": orjson.dumps([hamlet.id]).decode(), "members": orjson.dumps([hamlet.id]).decode(),
@ -491,7 +491,7 @@ class UserGroupAPITestCase(UserGroupTestCase):
self.assert_json_error(result, "User group name cannot exceed 100 characters.") self.assert_json_error(result, "User group name cannot exceed 100 characters.")
self.assert_length(NamedUserGroup.objects.filter(realm=hamlet.realm), 10) self.assert_length(NamedUserGroup.objects.filter(realm=hamlet.realm), 10)
# Test emtpty group name. # Test empty group name.
params = { params = {
"name": "", "name": "",
"members": orjson.dumps([hamlet.id]).decode(), "members": orjson.dumps([hamlet.id]).decode(),