Fix test by making this specific like it should be

This commit is contained in:
shamoon
2026-04-06 23:17:36 -07:00
parent f2ac4d763a
commit 3d91e995bb

View File

@@ -1309,7 +1309,7 @@ class TestCustomFieldsAPI(DirectoriesMixin, APITestCase):
# Test as user without access to the document
non_superuser = User.objects.create_user(username="non_superuser")
non_superuser.user_permissions.add(
*Permission.objects.all(),
*Permission.objects.exclude(codename="can_view_statistics"),
)
non_superuser.save()
self.client.force_authenticate(user=non_superuser)