Skip to content

Commit

Permalink
Add another exposure that gets ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Nov 26, 2024
1 parent f131df9 commit c6d70fc
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,19 @@ def test_query_runner_with_data_warehouse_series(self):
timestamp=datetime(2023, 1, i + 1),
)

# "user_test_3" exposure (feature_flag_property="test") is on 2023-01-04
# "user_test_3" first exposure (feature_flag_property="control") is on 2023-01-03
# "user_test_3" relevant exposure (feature_flag_property="test") is on 2023-01-04
# "user_test_3" other event (feature_flag_property="control" is on 2023-01-05
# "user_test_3" purchase is on 2023-01-06
# "user_test_3" second exposure (feature_flag_property="control") is on 2023-01-09
# "user_test_3" should fall into the "test" variant, not the "control" variant
_create_event(
team=self.team,
event="$feature_flag_called",
distinct_id="user_test_3",
properties={feature_flag_property: "control"},
timestamp=datetime(2023, 1, 3),
)
_create_event(
team=self.team,
event="Some other event",
Expand Down Expand Up @@ -561,7 +569,7 @@ def test_query_runner_with_data_warehouse_series(self):

self.assertEqual(control_result.count, 1)
self.assertEqual(test_result.count, 3)
self.assertEqual(control_result.absolute_exposure, 8)
self.assertEqual(control_result.absolute_exposure, 9)
self.assertEqual(test_result.absolute_exposure, 9)

def test_query_runner_with_invalid_data_warehouse_table_name(self):
Expand Down

0 comments on commit c6d70fc

Please sign in to comment.