posthog-js supports person.set_once but our backend doesn't. Make sure we can pass through `$set_once` on an `$identify` call, and only set the properties within if the properties aren't already set on the user.
posthog/tasks/test/test_process_event.py
from datetime import timedelta
from typing import Any, Callable, List, Union
from unittest.mock import patch
from uuid import UUID
from django.conf import settings
from django.utils.timezone import now
from freezegun import freeze_time
from posthog.models import (
    Action,
    ActionStep,
    Element,
    ElementGroup,
    Event,
    FeatureFlag,
    Organization,
    Person,
    SessionRecordingEvent,
    Team,
    User,
)
from posthog.tasks.process_event import process_event as _process_event
from posthog.test.base import BaseTest
def get_elements(event_id: Union[int, UUID]) -> List[Element]:
    event = Event.objects.get(pk=event_id)
    return [e for e in ElementGroup.objects.get(hash=event.elements_hash).element_set.all().order_by("order")]
def test_process_event_factory(
    process_event: Callable, get_events: Callable, get_session_recording_events: Callable, get_elements: Callable
) -> Callable:
    class TestProcessEvent(BaseTest):