Skip to content

Commit

Permalink
Fix trends tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Jun 20, 2024
1 parent f23ec15 commit 4137f33
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 71 deletions.
6 changes: 4 additions & 2 deletions posthog/api/test/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@
from rest_framework import status

from posthog.models.event.util import create_event
from posthog.models.utils import uuid7
from posthog.test.base import APIBaseTest


class TestSessionsAPI(APIBaseTest):
def setUp(self) -> None:
super().setUp()
s1 = str(uuid7())

create_event(
team=self.team,
event="$pageview",
distinct_id="d1",
properties={"$session_id": "s1", "utm_source": "google"},
properties={"$session_id": s1, "utm_source": "google"},
event_uuid=(uuid.uuid4()),
)
create_event(
team=self.team,
event="$pageview",
distinct_id="d1",
properties={"$session_id": "s1", "utm_source": "youtube"},
properties={"$session_id": s1, "utm_source": "youtube"},
event_uuid=(uuid.uuid4()),
)

Expand Down
2 changes: 1 addition & 1 deletion posthog/hogql/database/schema/test/test_sessions_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def test_bounce_rate(self):
class TestGetLazySessionProperties(ClickhouseTestMixin, APIBaseTest):
def test_all(self):
results = get_lazy_session_table_properties_v2(None)
self.assertEqual(len(results), 21)
self.assertEqual(len(results), 20)
self.assertEqual(
results[0],
{
Expand Down
Loading

0 comments on commit 4137f33

Please sign in to comment.