diff --git a/ldclient/client.py b/ldclient/client.py index 7934bf87..dfbeb649 100644 --- a/ldclient/client.py +++ b/ldclient/client.py @@ -235,7 +235,7 @@ def cb(feature): if val is None: val = default self._send({'kind': 'feature', 'key': key, - 'user': user, 'value': val}) + 'user': user, 'value': val, 'default': default}) return val if self._config.stream and self._store.initialized: diff --git a/testing/test_ldclient.py b/testing/test_ldclient.py index ed126cf8..438e63d2 100644 --- a/testing/test_ldclient.py +++ b/testing/test_ldclient.py @@ -115,7 +115,7 @@ def test_toggle_event(): client.toggle('feature.key', user, default=None) def expected_event(e): - return e['kind'] == 'feature' and e['key'] == 'feature.key' and e['user'] == user and e['value'] == True + return e['kind'] == 'feature' and e['key'] == 'feature.key' and e['user'] == user and e['value'] == True and e['default'] == None assert expected_event(client._queue.get(False))