async def test_sync_and_async_or(self, authenticated_request):
        """Test OR operator with sync and async permissions"""
        sync_perm = permissions.IsAuthenticated()
        async_perm = permissions.AllowAny()

        # IsAuthenticated | AllowAny
        combined = sync_perm | async_perm

        # Anonymous user - should fail first check, pass second
        anon_user = Mock(is_authenticated=False)
        anon_request = Mock(user=anon_user)
        assert await combined.has_permission_async(anon_request, None) is True

        # Authenticated user - should pass first check, short-circuit
        tracker1 = PermissionCalledTracker(True)  # Sync perm
        tracker2 = PermissionCalledTracker(True)  # Async perm
        combined_trackers = tracker1 | tracker2

        assert (
            await combined_trackers.has_permission_async(authenticated_request, None)
            is True
        )
        assert tracker1.called_async is True
        assert tracker2.called_async is False
Test OR operator with sync and async permissions
tests/test_async_permissions.py