55
66import sentry_sdk
77from sentry_sdk .integrations import _processed_integrations , _installed_integrations
8- from sentry_sdk .integrations .featureflags import FeatureFlagsIntegration , add_flag
8+ from sentry_sdk .integrations .featureflags import (
9+ FeatureFlagsIntegration ,
10+ add_feature_flag ,
11+ )
912
1013
1114@pytest .fixture
@@ -23,9 +26,9 @@ def test_featureflags_integration(sentry_init, capture_events, uninstall_integra
2326 uninstall_integration (FeatureFlagsIntegration .identifier )
2427 sentry_init (integrations = [FeatureFlagsIntegration ()])
2528
26- add_flag ("hello" , False )
27- add_flag ("world" , True )
28- add_flag ("other" , False )
29+ add_feature_flag ("hello" , False )
30+ add_feature_flag ("world" , True )
31+ add_feature_flag ("other" , False )
2932
3033 events = capture_events ()
3134 sentry_sdk .capture_exception (Exception ("something wrong!" ))
@@ -48,13 +51,13 @@ def test_featureflags_integration_threaded(
4851 events = capture_events ()
4952
5053 # Capture an eval before we split isolation scopes.
51- add_flag ("hello" , False )
54+ add_feature_flag ("hello" , False )
5255
5356 def task (flag_key ):
5457 # Creates a new isolation scope for the thread.
5558 # This means the evaluations in each task are captured separately.
5659 with sentry_sdk .isolation_scope ():
57- add_flag (flag_key , False )
60+ add_feature_flag (flag_key , False )
5861 # use a tag to identify to identify events later on
5962 sentry_sdk .set_tag ("task_id" , flag_key )
6063 sentry_sdk .capture_exception (Exception ("something wrong!" ))
@@ -97,13 +100,13 @@ def test_featureflags_integration_asyncio(
97100 events = capture_events ()
98101
99102 # Capture an eval before we split isolation scopes.
100- add_flag ("hello" , False )
103+ add_feature_flag ("hello" , False )
101104
102105 async def task (flag_key ):
103106 # Creates a new isolation scope for the thread.
104107 # This means the evaluations in each task are captured separately.
105108 with sentry_sdk .isolation_scope ():
106- add_flag (flag_key , False )
109+ add_feature_flag (flag_key , False )
107110 # use a tag to identify to identify events later on
108111 sentry_sdk .set_tag ("task_id" , flag_key )
109112 sentry_sdk .capture_exception (Exception ("something wrong!" ))
0 commit comments