Skip to content

Commit 7085f11

Browse files
committed
Add snapshots to v3 session tests
1 parent f555f8d commit 7085f11

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

posthog/clickhouse/test/test_raw_sessions_v3_model.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import datetime
22

3-
from posthog.test.base import BaseTest, ClickhouseTestMixin, _create_event, flush_persons_and_events
3+
from posthog.test.base import (
4+
BaseTest,
5+
ClickhouseTestMixin,
6+
_create_event,
7+
flush_persons_and_events,
8+
snapshot_clickhouse_queries,
9+
)
410

511
from posthog.clickhouse.client import query_with_columns, sync_execute
612
from posthog.models.raw_sessions.sql_v3 import RAW_SESSION_TABLE_BACKFILL_SQL_V3
@@ -22,6 +28,7 @@ def create_session_id():
2228
return str(uuid7(random=session_id_counter))
2329

2430

31+
@snapshot_clickhouse_queries
2532
class TestRawSessionsModel(ClickhouseTestMixin, BaseTest):
2633
def select_by_session_id(self, session_id):
2734
flush_persons_and_events()

posthog/hogql/database/schema/test/test_sessions_v3.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
from time import time_ns
33

44
import pytest
5-
from posthog.test.base import APIBaseTest, ClickhouseTestMixin, _create_event, _create_person
5+
from posthog.test.base import (
6+
APIBaseTest,
7+
ClickhouseTestMixin,
8+
_create_event,
9+
_create_person,
10+
snapshot_clickhouse_queries,
11+
)
612

713
from posthog.schema import FilterLogicalOperator, HogQLQueryModifiers, SessionTableVersion
814

@@ -18,6 +24,7 @@
1824
from posthog.models.utils import uuid7
1925

2026

27+
@snapshot_clickhouse_queries
2128
class TestSessionsV3(ClickhouseTestMixin, APIBaseTest):
2229
def __execute(
2330
self,

0 commit comments

Comments
 (0)