def test_calculate_cohorts(self) -> None: FeatureFlag.objects.create( team=self.team, filters={ "groups": [{ "properties": [{ "key": "id", "type": "cohort", "value": 267 }], "rollout_percentage": None }] }, key="default-flag-1", created_by=self.user, ) FeatureFlag.objects.create( team=self.team, filters={ "groups": [{ "properties": [ { "key": "id", "type": "cohort", "value": 22 }, { "key": "id", "type": "cohort", "value": 35 }, ], "rollout_percentage": None, }] }, key="default-flag-2", created_by=self.user, ) calculate_cohorts()
def calculate_cohort(): from posthog.tasks.calculate_cohort import calculate_cohorts calculate_cohorts()