diff --git a/posthog/test/test_before_send.py b/posthog/test/test_before_send.py index e2cda0a7..425294e6 100644 --- a/posthog/test/test_before_send.py +++ b/posthog/test/test_before_send.py @@ -16,6 +16,10 @@ ) +_CIRCULAR: dict = {} +_CIRCULAR["self"] = _CIRCULAR + + class TestClient(unittest.TestCase): @classmethod def setUpClass(cls): @@ -259,6 +263,8 @@ def test_before_send_callback_non_dict_output_drops_event(self): "private-value", ["malformed", "valid"], ), + # A value json cannot write costs only that event. + ("circular_reference", "private-key", _CIRCULAR, ["valid"]), ] ) def test_malformed_before_send_event_does_not_stop_consumer_or_shutdown(