forked from PostHog/posthog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(assistant): omit feature flags (PostHog#28057)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
97c3f54
commit ed29226
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -444,3 +444,33 @@ def test_query_count(self): | |
self.assertEqual(response.results[0].property, "prop") | ||
self.assertEqual(response.results[0].sample_count, 3) | ||
self.assertEqual(len(response.results[0].sample_values), 1) | ||
|
||
def test_feature_flags_properties_are_omitted(self): | ||
_create_person( | ||
distinct_ids=["person1"], | ||
properties={"email": "[email protected]"}, | ||
team=self.team, | ||
) | ||
_create_event( | ||
event="event1", | ||
distinct_id="person1", | ||
properties={"$feature/ai": "1"}, | ||
team=self.team, | ||
) | ||
_create_event( | ||
event="event1", | ||
distinct_id="person2", | ||
properties={"prop": "2"}, | ||
team=self.team, | ||
) | ||
_create_event( | ||
event="event1", | ||
distinct_id="person2", | ||
properties={"prop": "3", "$feature/dashboard": "0"}, | ||
team=self.team, | ||
) | ||
|
||
response = EventTaxonomyQueryRunner(team=self.team, query=EventTaxonomyQuery(event="event1")).calculate() | ||
self.assertEqual(len(response.results), 1) | ||
self.assertEqual(response.results[0].property, "prop") | ||
self.assertEqual(response.results[0].sample_count, 2) |