Skip to content

Commit

Permalink
Fix clickhouse trends EE
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Nov 17, 2023
1 parent 2c6ba31 commit df182d1
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions ee/clickhouse/views/test/test_clickhouse_trends.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,7 @@ def test_insight_trends_cumulative(self):
],
)
data_response = get_trends_time_series_ok(self.client, request, self.team)
person_response = get_people_from_url_ok(
self.client, data_response["$pageview - val"]["2012-01-14"].person_url
)
person_response = get_people_from_url_ok(self.client, data_response["val"]["2012-01-14"].person_url)

assert data_response["val"]["2012-01-13"].value == 1
assert data_response["val"]["2012-01-13"].breakdown_value == "val"
Expand Down Expand Up @@ -894,7 +892,7 @@ def test_insight_trends_cumulative(self):
],
)
data_response = get_trends_time_series_ok(self.client, request, self.team)
people = get_people_from_url_ok(self.client, data_response["$pageview - val"]["2012-01-14"].person_url)
people = get_people_from_url_ok(self.client, data_response["val"]["2012-01-14"].person_url)

assert data_response["val"]["2012-01-13"].value == 1
assert data_response["val"]["2012-01-13"].breakdown_value == "val"
Expand Down Expand Up @@ -933,12 +931,10 @@ def test_breakdown_with_filter(self):
properties=[{"key": "key", "value": "oh", "operator": "not_icontains"}],
)
data_response = get_trends_time_series_ok(self.client, params, self.team)
person_response = get_people_from_url_ok(
self.client, data_response["sign up - val"]["2012-01-13"].person_url
)
person_response = get_people_from_url_ok(self.client, data_response["val"]["2012-01-13"].person_url)

assert data_response["sign up - val"]["2012-01-13"].value == 1
assert data_response["sign up - val"]["2012-01-13"].breakdown_value == "val"
assert data_response["val"]["2012-01-13"].value == 1
assert data_response["val"]["2012-01-13"].breakdown_value == "val"

assert sorted([p["id"] for p in person_response]) == sorted([str(created_people["person1"].uuid)])

Expand All @@ -950,11 +946,9 @@ def test_breakdown_with_filter(self):
events=[{"id": "sign up", "name": "sign up", "type": "events", "order": 0}],
)
aggregate_response = get_trends_aggregate_ok(self.client, params, self.team)
aggregate_person_response = get_people_from_url_ok(
self.client, aggregate_response["sign up - val"].person_url
)
aggregate_person_response = get_people_from_url_ok(self.client, aggregate_response["val"].person_url)

assert aggregate_response["sign up - val"].value == 1
assert aggregate_response["val"].value == 1
assert sorted([p["id"] for p in aggregate_person_response]) == sorted([str(created_people["person1"].uuid)])

def test_insight_trends_compare(self):
Expand Down

0 comments on commit df182d1

Please sign in to comment.