Skip to content

Commit c9d92a7

Browse files
author
Pranjal Vachaspati
committed
Add test
1 parent 0709c1b commit c9d92a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ldclient/testing/test_ldclient_events.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,12 @@ def test_no_event_for_existing_feature_with_invalid_context():
318318
bad_context = Context.create('')
319319
assert 'default' == client.variation('feature.key', bad_context, default='default')
320320
assert count_events(client) == 0
321+
322+
323+
def test_no_event_when_send_events_false():
324+
feature = build_off_flag_with_value('feature.key', 'value').track_events(True).build()
325+
store = InMemoryFeatureStore()
326+
store.init({FEATURES: {feature.key: feature.to_json_dict()}})
327+
with make_client(store) as client:
328+
assert 'value' == client.variation(feature.key, context, default='default', send_events=False)
329+
assert count_events(client) == 0

0 commit comments

Comments
 (0)