posthog/clickhouse/test/test_person_overrides.py
import json
from datetime import datetime, timedelta
from time import sleep
from uuid import uuid4
import pytest
import pytz
from kafka import KafkaProducer
from posthog.clickhouse.client import sync_execute
from posthog.kafka_client.topics import KAFKA_PERSON_OVERRIDE
from posthog.models.person_overrides.sql import (
    DROP_KAFKA_PERSON_OVERRIDES_TABLE_SQL,
    DROP_PERSON_OVERRIDES_CREATE_MATERIALIZED_VIEW_SQL,
    KAFKA_PERSON_OVERRIDES_TABLE_SQL,
    PERSON_OVERRIDES_CREATE_MATERIALIZED_VIEW_SQL,
)
from posthog.settings.data_stores import KAFKA_HOSTS
@pytest.mark.django_db
def test_can_insert_person_overrides():