Skip to content

Commit 2a93f35

Browse files
committed
Use correct operator in tests
1 parent 6953d4e commit 2a93f35

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

posthog/test/test_feature_flags.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ def test_feature_flags_with_flag_dependencies(
13761376
"properties": [
13771377
{
13781378
"key": "beta-feature",
1379-
"operator": "exact",
1379+
"operator": "flag_evaluates_to",
13801380
"value": True,
13811381
"type": "flag",
13821382
"dependency_chain": ["beta-feature"],
@@ -1456,7 +1456,7 @@ def test_flag_dependencies_simple_chain(self, patch_get, patch_flags):
14561456
"properties": [
14571457
{
14581458
"key": "flag-a",
1459-
"operator": "exact",
1459+
"operator": "flag_evaluates_to",
14601460
"value": True,
14611461
"type": "flag",
14621462
"dependency_chain": ["flag-a"],
@@ -1504,7 +1504,7 @@ def test_flag_dependencies_circular_dependency(self, patch_get, patch_flags):
15041504
"properties": [
15051505
{
15061506
"key": "flag-b",
1507-
"operator": "exact",
1507+
"operator": "flag_evaluates_to",
15081508
"value": True,
15091509
"type": "flag",
15101510
"dependency_chain": [], # Empty chain indicates circular dependency
@@ -1526,7 +1526,7 @@ def test_flag_dependencies_circular_dependency(self, patch_get, patch_flags):
15261526
"properties": [
15271527
{
15281528
"key": "flag-a",
1529-
"operator": "exact",
1529+
"operator": "flag_evaluates_to",
15301530
"value": True,
15311531
"type": "flag",
15321532
"dependency_chain": [], # Empty chain indicates circular dependency
@@ -1566,7 +1566,7 @@ def test_flag_dependencies_missing_flag(self, patch_get, patch_flags):
15661566
"properties": [
15671567
{
15681568
"key": "non-existent-flag",
1569-
"operator": "exact",
1569+
"operator": "flag_evaluates_to",
15701570
"value": True,
15711571
"type": "flag",
15721572
"dependency_chain": ["non-existent-flag"],
@@ -1629,14 +1629,14 @@ def test_flag_dependencies_complex_chain(self, patch_get, patch_flags):
16291629
"properties": [
16301630
{
16311631
"key": "flag-a",
1632-
"operator": "exact",
1632+
"operator": "flag_evaluates_to",
16331633
"value": True,
16341634
"type": "flag",
16351635
"dependency_chain": ["flag-a"],
16361636
},
16371637
{
16381638
"key": "flag-b",
1639-
"operator": "exact",
1639+
"operator": "flag_evaluates_to",
16401640
"value": True,
16411641
"type": "flag",
16421642
"dependency_chain": ["flag-b"],
@@ -1658,7 +1658,7 @@ def test_flag_dependencies_complex_chain(self, patch_get, patch_flags):
16581658
"properties": [
16591659
{
16601660
"key": "flag-c",
1661-
"operator": "exact",
1661+
"operator": "flag_evaluates_to",
16621662
"value": True,
16631663
"type": "flag",
16641664
"dependency_chain": ["flag-a", "flag-b", "flag-c"],
@@ -1711,7 +1711,7 @@ def test_flag_dependencies_mixed_conditions(self, patch_get, patch_flags):
17111711
"properties": [
17121712
{
17131713
"key": "base-flag",
1714-
"operator": "exact",
1714+
"operator": "flag_evaluates_to",
17151715
"value": True,
17161716
"type": "flag",
17171717
"dependency_chain": ["base-flag"],
@@ -1788,10 +1788,10 @@ def test_flag_dependencies_malformed_chain(self, patch_get, patch_flags):
17881788
"properties": [
17891789
{
17901790
"key": "base-flag",
1791-
"operator": "exact",
1791+
"operator": "flag_evaluates_to",
17921792
"value": True,
17931793
"type": "flag",
1794-
# No dependency_chain property - should handle gracefully
1794+
# No dependency_chain property - should evaluate as inconclusive
17951795
}
17961796
],
17971797
"rollout_percentage": 100,
@@ -1815,7 +1815,7 @@ def test_flag_dependencies_without_context_raises_inconclusive(self):
18151815

18161816
property_with_flag_dep = {
18171817
"key": "some-flag",
1818-
"operator": "exact",
1818+
"operator": "flag_evaluates_to",
18191819
"value": True,
18201820
"type": "flag",
18211821
"dependency_chain": ["some-flag"],

0 commit comments

Comments
 (0)