Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Dec 21, 2023
1 parent c4d9a60 commit a0840e3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ee/clickhouse/queries/test/test_breakdown_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_breakdown_person_props(self):
"count(*)",
self.team,
)
self.assertEqual(res, ["test"])
self.assertEqual(res[0], ["test"])

def test_breakdown_person_props_with_entity_filter(self):
_create_person(team_id=self.team.pk, distinct_ids=["p1"], properties={"$browser": "test"})
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_breakdown_person_props_with_entity_filter(self):
}
)
res = get_breakdown_prop_values(filter, Entity(entity_params[0]), "count(*)", self.team)
self.assertEqual(res, ["test"])
self.assertEqual(res[0], ["test"])

@snapshot_clickhouse_queries
def test_breakdown_person_props_with_entity_filter_and_or_props_with_partial_pushdown(self):
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_breakdown_person_props_with_entity_filter_and_or_props_with_partial_pus
}
)
res = sorted(get_breakdown_prop_values(filter, Entity(entity_params[0]), "count(*)", self.team))
self.assertEqual(res, ["test", "test2"])
self.assertEqual(res[0], ["test", "test2"])

@snapshot_clickhouse_queries
def test_breakdown_group_props(self):
Expand Down Expand Up @@ -319,7 +319,7 @@ def test_breakdown_group_props(self):
team=self.team,
)
result = get_breakdown_prop_values(filter, filter.entities[0], "count(*)", self.team)
self.assertEqual(result, ["finance", "technology"])
self.assertEqual(result[0], ["finance", "technology"])

filter = Filter(
data={
Expand All @@ -345,7 +345,7 @@ def test_breakdown_group_props(self):
}
)
result = get_breakdown_prop_values(filter, filter.entities[0], "count(*)", self.team)
self.assertEqual(result, ["finance", "technology"])
self.assertEqual(result[0], ["finance", "technology"])

@snapshot_clickhouse_queries
def test_breakdown_session_props(self):
Expand Down Expand Up @@ -397,7 +397,7 @@ def test_breakdown_session_props(self):
}
)
result = get_breakdown_prop_values(filter, filter.entities[0], "count(*)", self.team)
self.assertEqual(result, [70, 20])
self.assertEqual(result[0], [70, 20])

@snapshot_clickhouse_queries
def test_breakdown_with_math_property_session(self):
Expand Down Expand Up @@ -511,10 +511,10 @@ def test_breakdown_with_math_property_session(self):
result = get_breakdown_prop_values(filter, filter.entities[0], aggregate_operation, self.team)
# test should come first, based on aggregate operation, even if absolute count of events for
# mac is higher
self.assertEqual(result, ["test", "mac"])
self.assertEqual(result[0], ["test", "mac"])

result = get_breakdown_prop_values(filter, filter.entities[0], "count(*)", self.team)
self.assertEqual(result, ["mac", "test"])
self.assertEqual(result[0], ["mac", "test"])


@pytest.mark.parametrize(
Expand Down

0 comments on commit a0840e3

Please sign in to comment.