def test_get_queryset(self):
        requesting_user = self.create_user()
        regular_user = self.create_user()
        superuser = self.create_superuser()

        view = self.view_class()
        view.request = self.request_factory.get('/')
        view.request.user = requesting_user

        queryset = view.get_queryset()

        # The regular user should be in the queryset
        self.assertIn(regular_user, queryset)

        # Superusers cannot be in the possible queryset
        self.assertNotIn(superuser, queryset)

        # The requesting user cannot be in the possible queryset
        self.assertNotIn(requesting_user, queryset)
Test the view's get_queryset() method
dataset/ETHPy150Open ofa/connect/open_connect/accounts/tests/test_views.py/UpdateUserPermissionViewTest.test_get_queryset