diff --git a/posthog/test/test_client.py b/posthog/test/test_client.py index 744b048a..0d3da206 100644 --- a/posthog/test/test_client.py +++ b/posthog/test/test_client.py @@ -292,7 +292,6 @@ def test_basic_capture_with_locally_evaluated_feature_flags(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature-local", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -321,7 +320,6 @@ def test_basic_capture_with_locally_evaluated_feature_flags(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "person-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -344,7 +342,6 @@ def test_basic_capture_with_locally_evaluated_feature_flags(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "false-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -396,7 +393,6 @@ def test_dont_override_capture_with_local_flags(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature-local", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -425,7 +421,6 @@ def test_dont_override_capture_with_local_flags(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "person-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -1039,7 +1034,7 @@ def raise_effect(): patch_get.return_value.raiseError.side_effect = raise_effect client = Client(FAKE_TEST_API_KEY, personal_api_key="test") - client.feature_flags = [{"key": "example", "is_simple_flag": False}] + client.feature_flags = [{"key": "example"}] self.assertFalse(client.feature_enabled("example", "distinct_id")) diff --git a/posthog/test/test_feature_flags.py b/posthog/test/test_feature_flags.py index 62de7300..af4f63f9 100644 --- a/posthog/test/test_feature_flags.py +++ b/posthog/test/test_feature_flags.py @@ -38,7 +38,6 @@ def test_flag_person_properties(self, patch_get): "id": 1, "name": "Beta Feature", "key": "person-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -77,7 +76,6 @@ def test_flag_group_properties(self, patch_get, patch_decide): "id": 1, "name": "Beta Feature", "key": "group-flag", - "is_simple_flag": True, "active": True, "filters": { "aggregation_group_type_index": 0, @@ -170,7 +168,6 @@ def test_flag_with_complex_definition(self, patch_get, patch_decide): "id": 1, "name": "Beta Feature", "key": "complex-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -286,7 +283,6 @@ def test_feature_flags_fallback_to_decide(self, patch_get, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -301,7 +297,6 @@ def test_feature_flags_fallback_to_decide(self, patch_get, patch_decide): "id": 2, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -343,7 +338,6 @@ def test_feature_flags_dont_fallback_to_decide_when_only_local_evaluation_is_tru "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -358,7 +352,6 @@ def test_feature_flags_dont_fallback_to_decide_when_only_local_evaluation_is_tru "id": 2, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -410,7 +403,6 @@ def test_feature_flag_never_returns_undefined_during_regular_evaluation(self, pa "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -457,7 +449,6 @@ def test_experience_continuity_flag_not_evaluated_locally(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -487,7 +478,6 @@ def test_get_all_flags_with_fallback(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -503,7 +493,6 @@ def test_get_all_flags_with_fallback(self, patch_decide, patch_capture): "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -518,7 +507,6 @@ def test_get_all_flags_with_fallback(self, patch_decide, patch_capture): "id": 3, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -551,7 +539,6 @@ def test_get_all_flags_and_payloads_with_fallback(self, patch_decide, patch_capt "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -570,7 +557,6 @@ def test_get_all_flags_and_payloads_with_fallback(self, patch_decide, patch_capt "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -588,7 +574,6 @@ def test_get_all_flags_and_payloads_with_fallback(self, patch_decide, patch_capt "id": 3, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -654,7 +639,6 @@ def test_get_all_flags_with_no_fallback(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -670,7 +654,6 @@ def test_get_all_flags_with_no_fallback(self, patch_decide, patch_capture): "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -696,7 +679,6 @@ def test_get_all_flags_and_payloads_with_no_fallback(self, patch_decide, patch_c "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -715,7 +697,6 @@ def test_get_all_flags_and_payloads_with_no_fallback(self, patch_decide, patch_c "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -751,7 +732,6 @@ def test_get_all_flags_with_fallback_but_only_local_evaluation_set(self, patch_d "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -767,7 +747,6 @@ def test_get_all_flags_with_fallback_but_only_local_evaluation_set(self, patch_d "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -782,7 +761,6 @@ def test_get_all_flags_with_fallback_but_only_local_evaluation_set(self, patch_d "id": 3, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -814,7 +792,6 @@ def test_get_all_flags_and_payloads_with_fallback_but_only_local_evaluation_set( "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -833,7 +810,6 @@ def test_get_all_flags_and_payloads_with_fallback_but_only_local_evaluation_set( "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -851,7 +827,6 @@ def test_get_all_flags_and_payloads_with_fallback_but_only_local_evaluation_set( "id": 3, "name": "Beta Feature", "key": "beta-feature2", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -888,7 +863,6 @@ def test_compute_inactive_flags_locally(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -904,7 +878,6 @@ def test_compute_inactive_flags_locally(self, patch_decide, patch_capture): "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -927,7 +900,6 @@ def test_compute_inactive_flags_locally(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": False, "rollout_percentage": 100, "filters": { @@ -943,7 +915,6 @@ def test_compute_inactive_flags_locally(self, patch_decide, patch_capture): "id": 2, "name": "Beta Feature", "key": "disabled-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -969,7 +940,6 @@ def test_feature_flags_local_evaluation_None_values(self, patch_get, patch_decid id: 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -1025,7 +995,6 @@ def test_feature_flags_local_evaluation_for_cohorts(self, patch_get, patch_decid "id": 2, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -1096,7 +1065,6 @@ def test_feature_flags_local_evaluation_for_negated_cohorts(self, patch_get, pat "id": 2, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -1209,7 +1177,6 @@ def test_feature_enabled_simple(self, patch_get, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "rollout_percentage": 100, "filters": { @@ -1234,7 +1201,6 @@ def test_feature_enabled_simple_is_false(self, patch_get, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "rollout_percentage": 0, "filters": { @@ -1259,7 +1225,6 @@ def test_feature_enabled_simple_is_true_when_rollout_is_undefined(self, patch_ge "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "rollout_percentage": None, "filters": { @@ -1283,7 +1248,6 @@ def test_feature_enabled_simple_with_project_api_key(self, patch_get): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "rollout_percentage": 100, "filters": { @@ -1307,7 +1271,6 @@ def test_feature_enabled_request_multi_variate(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1332,7 +1295,6 @@ def test_feature_enabled_simple_without_rollout_percentage(self, patch_get): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -1354,7 +1316,6 @@ def test_get_feature_flag(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1420,7 +1381,6 @@ def test_get_feature_flag_with_variant_overrides(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1461,7 +1421,6 @@ def test_flag_with_clashing_variant_overrides(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1513,7 +1472,6 @@ def test_flag_with_invalid_variant_overrides(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1554,7 +1512,6 @@ def test_flag_with_multiple_variant_overrides(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -1597,7 +1554,6 @@ def test_boolean_feature_flag_payloads_local(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "person-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [ @@ -1661,7 +1617,6 @@ def test_multivariate_feature_flag_payloads(self, patch_decide): "id": 1, "name": "Beta Feature", "key": "beta-feature", - "is_simple_flag": False, "active": True, "rollout_percentage": 100, "filters": { @@ -2239,7 +2194,6 @@ def test_capture_is_called(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "complex-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -2402,7 +2356,6 @@ def test_capture_is_called_in_get_feature_flag_payload(self, patch_decide, patch "id": 1, "name": "Beta Feature", "key": "person-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -2480,7 +2433,6 @@ def test_disable_geoip_get_flag_capture_call(self, patch_decide, patch_capture): "id": 1, "name": "Beta Feature", "key": "complex-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -2523,7 +2475,6 @@ def test_capture_multiple_users_doesnt_out_of_memory(self, patch_decide, patch_c "id": 1, "name": "Beta Feature", "key": "complex-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [ @@ -2582,7 +2533,6 @@ def test_simple_flag_consistency(self, patch_get): "id": 1, "name": "Beta Feature", "key": "simple-flag", - "is_simple_flag": True, "active": True, "filters": { "groups": [{"properties": [], "rollout_percentage": 45}], @@ -3610,7 +3560,6 @@ def test_multivariate_flag_consistency(self, patch_get): "id": 1, "name": "Beta Feature", "key": "multivariate-flag", - "is_simple_flag": False, "active": True, "filters": { "groups": [{"properties": [], "rollout_percentage": 55}],